diff options
| author | Connor McDowell <[email protected]> | 2024-03-09 19:10:18 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-03-09 19:10:18 -0800 |
| commit | 8e37b18485fddf7d1dd730db67fd6df7680aaca0 (patch) | |
| tree | d43e5b751b8486e6ed8f2c638db921f47328daf0 /Project1 | |
| parent | complete (diff) | |
| download | in-class-exercise-4-connormcdowell275-main.tar.xz in-class-exercise-4-connormcdowell275-main.zip | |
Diffstat (limited to 'Project1')
| -rw-r--r-- | Project1/project.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Project1/project.cpp b/Project1/project.cpp index 4cdff64..c6f3c63 100644 --- a/Project1/project.cpp +++ b/Project1/project.cpp @@ -13,6 +13,11 @@ 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; @@ -28,9 +33,6 @@ int main() cout << "You've selected option 2!" << endl; break; case 3: - int x = 0; - int y = 0; - int z = 0; 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; @@ -43,12 +45,19 @@ int main() break; case 4: cout << "ooooo you found the secret option! Prepare for my ultimate attack!" << endl; - cout << "INFINITY LOOP" << endl; - cout << "(sorry)" << endl; - int B = 1; - while(B = 1) + cout << "are you ready?" << endl; + for (auto i = 0u; i <= 1; i++) { - cout << "GET STUCK" << endl; + 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: |