aboutsummaryrefslogtreecommitdiff
path: root/CST 126/Homework 1
diff options
context:
space:
mode:
authorChanin Timbal <[email protected]>2024-04-17 19:28:24 -0700
committerChanin Timbal <[email protected]>2024-04-17 19:28:24 -0700
commite405a83d91b70ff30d03e51439a882c259afe70a (patch)
treef3755aac80dc502be0c692500bfaeb6e8b6b4705 /CST 126/Homework 1
parentAdded Hello World cout (diff)
downloadhomework-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.cpp46
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