diff options
| author | Chanin Timbal <[email protected]> | 2024-04-17 19:28:24 -0700 |
|---|---|---|
| committer | Chanin Timbal <[email protected]> | 2024-04-17 19:28:24 -0700 |
| commit | e405a83d91b70ff30d03e51439a882c259afe70a (patch) | |
| tree | f3755aac80dc502be0c692500bfaeb6e8b6b4705 /CST 126/Homework 1 | |
| parent | Added Hello World cout (diff) | |
| download | homework-1-chaninnohea-e405a83d91b70ff30d03e51439a882c259afe70a.tar.xz homework-1-chaninnohea-e405a83d91b70ff30d03e51439a882c259afe70a.zip | |
I committed and pushed this branch
Diffstat (limited to 'CST 126/Homework 1')
| -rw-r--r-- | CST 126/Homework 1/main.cpp | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/CST 126/Homework 1/main.cpp b/CST 126/Homework 1/main.cpp index 4460e4f..21f25f8 100644 --- a/CST 126/Homework 1/main.cpp +++ b/CST 126/Homework 1/main.cpp @@ -4,10 +4,50 @@ // Assignment: Homework #include <iostream> +#include <bitset> +#include <cctype> +#include <cstring> +using std::cout; +using std::cin; -int main() { - - std::cout << "Hello World"; +int main() +{ + int input_choice = 0; + int output_choice = 0; + float conversion = 0.0; + float amount = 0.0; + cout << "Choose your input currency: "; + currency_menu(); + cin >> input_choice; + cout << ""; + cout << "choose your output currency: "; + currency_menu(); + cin >> output_choice; + conversion = convert(input_choice, output_choice, amount); + cout << conversion; return 0; +} + +float convert(input, output, amount) +{ + const float GBP = 0.80; + const float Euro = 0.94; + const float Yen = 152.22; + const float AUD = 1.55; + const float USD = 1; + if (input == output) + { + return + } + +} + +void currency_menu() +{ + cout << "1. GBP" + << "2. Euro" + << "3. Yen" + << "4. AUD" + << "5. USD\n"; }
\ No newline at end of file |