Question
Write a program that prompts the user to input a sequence of characters and outputs the number of vowels. (Use the function isVowel written in
Write a program that prompts the user to input a sequence of characters and outputs the number of vowels. (Use the function isVowel written in Programming Exercise 2.) I have this much done.
I must use cin.get somewhere
#include
using namespace std;
bool isVowel (char ch); int main() { char ch; int num; num = 0; cout << "enter a sequence of characters: "; return 0; }
bool isVowel(char ch) { switch (ch) { case 'A': case 'E': case 'I': case 'O': case 'U': case 'a': case 'e': case 'i': case 'o': case 'u': return true; default: return false; } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started