Question: Write a program that reads a sentence as an input from the user until a period (.) is entered (which marks the end of the
Write a program that reads a sentence as an input from the user until a period (.) is entered (which marks the end of the input). The program should count and print the number of vowels (a,e,i,o,u) in the entered sentence.
The program has additional requirements as follows:
You must use the built-in array of characters to store the input.
You must use the name of the array itself as the pointer to iterate over the array. Do not use another integer or a pointer variable.
You may use getline() and tolower() functions.
Example output:
Enter a sentence: And
that's the way it is.
Your sentence contains 6 vowels.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
