using c++ programming: Modify Program 9.10 to displaythe number of vowels in a user-entered string.(program 9.10attached in picture)
Program 9.10 #include <iostream> #include <string> using namespace std; int main() string str = “Counting the number of vowels”; int i, numchars; int vowelCount = 0; cout << “The string: ” «< str << endl; numChars = int(str.length()); for (i = 0; i < numchars; i++) switch (str.at(i)) // here’s where a character is retrieved ‘a’: 10 10 ооооо 10 10 10 tonininin ‘i’: ‘o’: vowel Count++; cout << “has” << vowelCount << ” vowels.” << endl; return 0; Show transcribed image text Program 9.10 #include #include using namespace std; int main() string str = “Counting the number of vowels”; int i, numchars; int vowelCount = 0; cout
Expert Answer
Answer to using c++ programming: Modify Program 9.10 to display the number of vowels in a user-entered string.(program 9.10 attach…