#K59622. Count the Vowels in Sentences
Count the Vowels in Sentences
Count the Vowels in Sentences
You are given several sentences. For each sentence, you need to count the number of vowels and output the result followed by the string vowels
. The vowels are defined as \(a, e, i, o, u\) (both lowercase and uppercase).
Example: For the sentence "Hello world", the vowels are e, o, o so the output should be "3 vowels".
Please note that input and output will be handled via standard input (stdin) and standard output (stdout). Make sure your solution reads from stdin and writes to stdout.
inputFormat
The first line of input contains a single integer \(n\), the number of sentences.
Each of the following \(n\) lines contains a sentence. A sentence could be empty.
outputFormat
For each sentence, output a single line containing the number of vowels in that sentence followed by a space and the word vowels
.
1
Hello world
3 vowels
</p>