Example 76: Count Vowels, Consonants, and Words
Learn how to count vowels, consonants, and words in a string array.
We'll cover the following...
Problem
Write a function that counts vowels, consonants, and words present in a sentence received as an input parameter.
Example
Input | Output (V, C, W) |
---|---|
str = “Able was I ere I saw elba” | 10, 9,7 |