Write a function that accepts a C-string as its argument. The function should count the number of vowels appearing in the string and return that number. Write another function that accepts a C-string as its argument. This function should count the number of consonants appearing in the string and return that number.Demonstrate the two functions in a program that performs the following steps:1. The user is asked to enter a string.2. The program displays the following menu: A) Count the number of vowels in the string B) Count the number of consonants in the string C) Count both the vowels and consonants in the string D) Enter another string E) Exit the program3. The program performs the operation selected by the user and repeats until the user selects E, to exit the program.
Write a function that accepts a C-string as its argument. The function should count the number of vowels appearing in the string and return that number.
Write another function that accepts a C-string as its argument. This function should count the number of consonants appearing in the string and return that number.
Demonstrate the two functions in a
1. The user is asked to enter a string.
2. The program displays the following menu:
A) Count the number of vowels in the string
B) Count the number of consonants in the string
C) Count both the vowels and consonants in the string
D) Enter another string
E) Exit the program
3. The program performs the operation selected by the user and repeats until the user selects E, to exit the program.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images