diff options
| author | Chanin Timbal <[email protected]> | 2024-06-01 11:49:52 -0700 |
|---|---|---|
| committer | Chanin Timbal <[email protected]> | 2024-06-01 11:49:52 -0700 |
| commit | ee299e40737932350f6b4b48a7380e2645089d45 (patch) | |
| tree | c33e828baa1951790771f05b051e912452302a5b /CST 126/Homework 1/main.cpp | |
| parent | Merge branch 'develop' of https://github.com/OIT-WI-2024/homework-1-chaninnoh... (diff) | |
| download | archived-homework-1-chaninnohea-ee299e40737932350f6b4b48a7380e2645089d45.tar.xz archived-homework-1-chaninnohea-ee299e40737932350f6b4b48a7380e2645089d45.zip | |
attempting rebuild
Diffstat (limited to 'CST 126/Homework 1/main.cpp')
| -rw-r--r-- | CST 126/Homework 1/main.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/CST 126/Homework 1/main.cpp b/CST 126/Homework 1/main.cpp new file mode 100644 index 0000000..690c255 --- /dev/null +++ b/CST 126/Homework 1/main.cpp @@ -0,0 +1,57 @@ +// Name: Chanin Timbal +// Class: CST 126 +// Date: 04/08/2024 +// Assignment: Homework 1 + +#include "header.h" + +//Main to run the program +int main() +{ + int option = 0; + char again = 'Y'; + cout << "Welcome! Please choose an option: \n"; + display_options(); + cin >> option; + cin.ignore(100, '\n'); + + while (option != 0) + { + if (option == 1) + { + run_conversion(again); + } + + else if (option == 2) + { + guessing_game(again); + } + + else if (option == 3) + { + + } + else + { + cout << "That is not one of the options!"; + display_options(); + cin >> option; + cin.ignore(100, '\n'); + } + + display_options(); + cin >> option; + cin.ignore(100, '\n'); + } + + return 0; +} + +//menu options +void display_options() +{ + cout << "1. Currency Converter\n"; + cout << "2. Guessing Game\n"; + cout << "3. Temperature Logger\n"; + cout << "0. Quit\n\n"; +} |