Counting Vowels
InterviewTime limit1sMemory limit128 MB
For each input line until a terminating '#', count how many letters are vowels regardless of case.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
Several English sentences are given. Write a program that counts how many vowels each sentence contains.
The vowels are a, e, i, o, and u. Both uppercase and lowercase letters count as vowels.
Input
The input consists of multiple test cases. Each test case is one line containing uppercase and lowercase English letters, commas (,), periods (.), exclamation marks (!), question marks (?), and spaces. Each line has at most 255 characters.
The final line of input contains only the single character #. Do not process this line.
Output
For each test case, output the number of vowels in that line on its own line.