// 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 int main() { char response = 'n'; // initialize for first condition // check through loop while (response != 'y' && response != 'Y') // control condition { printf("Hey you! You at the keyboard! You're a jerk!!!\n"); printf("Have you had enough (y/n)? "); scanf(" %c", &response); } printf("Have a lovely day.\n"); return 0; }