Advertisement
routinodesigns

EOF

Apr 14th, 2020
2,861
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.46 KB | None | 0 0
  1. with Ada.Text_IO;
  2. use Ada.Text_IO;
  3. with Ada.Integer_Text_IO;
  4. use Ada.Integer_Text_IO;
  5. procedure vowelcounter is
  6.    Letter:Character;
  7.    counter:Integer:=0;
  8.  
  9. begin
  10.    while not End_Of_File loop
  11.  
  12.       Get(Letter);
  13.       case Letter is
  14.       when 'a'|'e'|'i'|'o'|'u' => counter:=counter+1;
  15.       when others =>
  16.          null;
  17.  
  18.       end case;
  19.    end loop;
  20.    New_Line;
  21.    Put_Line("you entered " & Integer'Image(counter) & " vowel");
  22. end vowelcounter;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement