Counting

How to make the program count the number of vowels in a sentence entered by the user?
There are 6 vocals in alphapet: a, e, i, o, u, y. You need to check eac letter separetely in string to find those.

pseudo code
1
2
3
4
5
6
7
8
9
read_string()
x=0
for each letter in string
do
  x++
  if string[x] is vocal
    total_vocals ++
loop
print_out_total_vocals()
Topic archived. No new replies allowed.