#include // The C++ input and output definitions. void main(void) { // declarations: char choice =' '; // A letter chosen by the user // executable statements: // Starting message: cout << "Before the loop.\n"; // Keep asking the user for keys until he/she enters a "q" while (choice != 'q' && choice != 'Q') { cout << "\nAt the start of the while loop now.\n"; cout << "Enter a letter: "; cin >> choice; if (choice == 'q' || choice == 'Q') cout << "Quit is requested.\n"; else cout << "You pressed the letter: " << choice << endl; cout << "Jumping back to the start of the while loop...\n"; } // Print a final message: cout << "\nAfter the loop.\n"; }