This is a rather easy challenge.
Input will contain a string (not
null or empty) of maximum length 100. Output the number of vowels in each word of the string, separated by spaces.
- The string will not be more than 100 characters in length.
- The string will only contain alphabets
a-zand can also contain spaces.
- Input must be consumed from the
stdinor command line arguments.
- Output must be outputted in the
- You can write a full program, or a function that takes input from the
stdinand outputs the result.
- The vowels that your program/function needs to count are
This is the first test case --> 1 1 1 1 1 2 one plus two equals three --> 2 1 1 3 2 aeiou AEIOU --> 5 5 psst --> 0 the quick brown fox jumped over the lazy dog --> 1 2 1 1 2 2 1 1 1
This is code-golf, so the shortest submission (in bytes) wins.
stdout. I don't like to "get input" via the function arguments. command-line arguments seems ok. I've added it into the post. \$\endgroup\$
The name "vowel" is often used for the symbols that represent vowel sounds in a language's writing system, particularly if the language uses an alphabet. In writing systems based on the Latin alphabet, the letters A, E, I, O, U, and sometimes Y are all used to represent vowels. However, not all of these letters represent vowels in all languages.What do YOU mean by vowels? \$\endgroup\$