// name: Connor McDowell // date: 3/9/2024 // class: CST 116 // reason: in class exercise 4 #include using std::cin; using std::cout; using std::endl; int main() { int O = 0; int c = 0; int x = 0; int y = 0; int z = 0; int B = 1; while(O == 0) { cout << "Please enter a number from and including 1 through 5!" << endl; cout << "Number 5 will close the program" << endl; cout << "I highly recommend not pressing 4." << endl; cin >> c; switch (c) { case 1: cout << "Programmer? I hardly know 'er!!" << endl; break; case 2: cout << "You've selected option 2!" << endl; break; case 3: cout << "Please enter a number when prompted, this will happen twice." << endl; cout << "Please enter a whole, non-negative and non-zero number: "; cin >> x; cout << "\n"; cout << "Enter a second, whole, non-negative, and non-zero number: "; cin >> y; cout << "\n"; z = x % y; cout << "The remainder left over after " << x << " is divided by " << y << " is: " << z << endl; break; case 4: cout << "ooooo you found the secret option! Prepare for my ultimate attack!" << endl; cout << "are you ready?" << endl; for (auto i = 0u; i <= 1; i++) { cout << "This is your last chance to avoid my strongest move!" << endl; cout << "INFINITY LOOP" << endl; cout << "Are you sure you want to continue down this path?" << endl; cout << "If you want to return to safety, enter any number but 1" << endl; cin >> B; while (B == 1) { cout << "GET STUCK" << endl; } break; } break; case 5: O = 1; break; default: cout << "Invalid choice. Please enter a number from 1 to 5." << endl; } } return 0; }