// a simple while-loop example. // keeps insulting the user until the user indicates he/she has had enough // Specifically, the loop ONLY terminates when the user types either the // uppercase 'Y' or the lowercase 'y'. #include using namespace std; int main() { char response = 'n'; // initialize for first condition // check through loop while (response != 'y' && response != 'Y') // control condition { cout << "Hey you! You at the keyboard! You're a jerk!!!\n"; cout << "Have you had enough (y/n)? "; cin >> response; } cout << "Have a nice day.\n"; return 0; }