It's me again and I need your help! I'am currently having difficulties with this problem, create a program that will ask the user to enter a character and that will keep on asking until the program encounters a vowel. (Use do while)
Currently, I have this code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream>
#include<string>
usingnamespace std;
int main()
{
string letter,a,e,i,o,u;
do
{
cout << "Enter a letter: " << endl;
cin >> letter;
} while (letter != a && letter != e &&
letter != i && letter != o && letter != u);
return 0;
}
But, it still keeps asking after I entered a vowel.