I have to write code that will prompt you to input a sentence, then it will output the number of vowels in the sentence. This is what I have so far. Can someone tell me what is wrong with it?
Thanks so much!
//Input a sentence, then return number of vowels in the sentence
#include <iostream>
using namespace std;
char ch(char vowel);
char isVowel (char a, char e, char i, char o, char u);
int main ()
char sentence;
char isVowel;
int number;
{
cout<<"Enter a sentence"<<endl;
cin>>sentence;
cout<<"There are "<<number<<" vowels in this sentence."<<endl;
return 0;
}
char isVowel (char a, char e, char i, char o, char u)
{
if (ch = 0)
return number;
else
return false;
}