✕
Character Arrays and StringsCoding problems
Character Arrays and Strings: coding problems
Write a program that reads the input and prints the answer. Run checks it against every test, including hidden ones.
0 of 7 solved
A proofreader scans a line of text and wants to know how many vowels it contains.
Count the letters
a,e,i,oandu, in capitals or small letters. Every other character counts for nothing: spaces, digits, punctuation and consonants.Read the whole line, which can contain spaces. The line can be empty, and then the answer is 0. The line can be up to 100000 characters long.
Input. One line of text. It may contain spaces, capitals and punctuation, and it may be empty.
Output. One integer: the number of vowels in the line.
Example 1 input
Programming Is Fun
Output
5
Example 2 input
xyz
Output
0