Question: C++ Programming. Dont use other libraries other than iostream & using namespace std; thanks Write a function, CountVowels , that takes a string as input

C++ Programming. Dont use other libraries other than iostream & using namespace std; thanks

Write a function, CountVowels, that takes a string as input and count the number of vowels (a,e,i,o,u either upper or lower case) alphabetic characters. The function returns an integer value for the number of vowels.

Your function should be named CountVowels

Your function has one input argument of type string

Your function has one return value of type integer representing the number of vowels in the input string

Your function should not print anything

Example: Calling function with a string "One1, Two2", should return 3.

Edge Cases:

If there are no vowel characters in the string, return 0

If the string is empty, return -1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!