Hello, I am having this problem with this program that wants me to use a while loop as input validation to ask the user to enter 'Y', 'y', 'N', or 'n'. This is what I have so far..
#include <iostream>
usingnamespace std;
int main()
{
char letter; //Answer with Y, y, N, or n
cout << " Would you like to exit this program?\n";
cout << " Answer 'Y' or 'y' for yes and \n";
cout << " 'N' or 'n' for no." << endl;
cin >> letter;
while(letter != 'Y' || letter != 'N')
{
cout << " Choose again: ";
cin >> letter;
}
cout << " Terminating program...." << endl;
system("pause");
return 0;
}