How would I fix something like this:
It is without the is a vowel or is not a vowel, still doesn't work but how do I fix it?
This is what it
Today Is Thr Jan, 2015
Enter a sentence:
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main()
{
int Uc = 0, Dc = 0, Vc=0;
int i=0;
char c = getchar();
string vowels("aeiouAEIOU");
cout << "Enter a sentence: ";
cin.get(c);
while (c != '\n')
{
if (c >= 'A' && c <= 'Z') {
Uc++;
i++;
}
else if(c >= '0' && c <= '9') {
Dc++;
i++;
}
else if(vowels.find(c) != string::npos)
{
Vc++;
i++;
}
}
cout << setfill ('.');
cout << "Number of uppercase letters" << right << setw(10) << Uc << endl;
cout << "Number of digits" << right << setw(10) << Dc << endl;
cout << "Number of vowels" << right << setw(10) << Vc << endl;
//end program
system("pause");
return 0;
}