home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / docs / lovelace / yes_no.adb < prev   
Encoding:
Text File  |  1995-03-17  |  333 b   |  15 lines

  1. with Text_IO; use Text_IO;
  2. with Ada.Characters.Handling; use Ada.Characters.Handling;
  3.  
  4. procedure Yes_No is
  5.   Response : Character;
  6. begin
  7.   Put("Would you like me to say Hello?");
  8.   Get(Response);  -- Get first character.
  9.   if (To_Lower(Response) = 'y') then
  10.     Put("Hello!");
  11.   else
  12.     Put("Okay, I won't.");
  13.   end if;
  14. end Yes_No;
  15.