You have a friend who is an English major. This friend needs to collect statistics about words for a project . The statistics are the number of vowels , consonants and letters that occur in a sequence of words. You offer to help by writing a program to aid in generating these statistics. Your friends tell you that he wants to enter as many words as he can think of.when he is done using the program he wants to enter "bye" and have the statistics displayed on the screen .In order to complete this program you must write the following functions;
A function that takes as an in parameter a single character. If this character is a vowel (a, e, I, or, u) it will return true, otherwise it will return false. you must deal with the fact that these vowels could be uppercase or lowercase. To do this add, #include
A function that takes a string as an in parameter and three in/out parameters .The in/out parameters are three counters, the number of vowels, the number of constants, and the number of letters , this function will update these counters appropriately based on the contents of the string that was passed in.
A function which takes as in the parameters the three counters and displays them to the screen as shown in he example below.
Your main function should use a flag controlled loop to prompt the user for a string (single word) and if that string is not ("bye") call the function to update the statistics .if the string is"bye" exit the loop and call the function to display the statistics.
Please enter a word ("bye" to exit): hike
Please enter a word ("bye" to exit):bike
please enter a word("bye" to exit):run
please enter a word("bye" to exit):swim
please enter a word("bye" to exit):bye
vowels:6
constants:9
total letters:15