aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab3/CST116F2021-Lab3-Guertin.cpp
diff options
context:
space:
mode:
authorAustin Guertin <[email protected]>2021-10-13 19:26:27 -0700
committerAustin Guertin <[email protected]>2021-10-13 19:26:27 -0700
commitd8a1720d5ae4ef80f4e43b7e71f7625523564b9a (patch)
treef9cedcc46db6c5ab05416878e9f9fdd94854313c /CST116F2021-Lab3/CST116F2021-Lab3-Guertin.cpp
parentthird push (diff)
downloadcst116-lab3-austinsworld15-d8a1720d5ae4ef80f4e43b7e71f7625523564b9a.tar.xz
cst116-lab3-austinsworld15-d8a1720d5ae4ef80f4e43b7e71f7625523564b9a.zip
fourth push
Diffstat (limited to 'CST116F2021-Lab3/CST116F2021-Lab3-Guertin.cpp')
-rw-r--r--CST116F2021-Lab3/CST116F2021-Lab3-Guertin.cpp52
1 files changed, 51 insertions, 1 deletions
diff --git a/CST116F2021-Lab3/CST116F2021-Lab3-Guertin.cpp b/CST116F2021-Lab3/CST116F2021-Lab3-Guertin.cpp
index cae55e8..7c242fc 100644
--- a/CST116F2021-Lab3/CST116F2021-Lab3-Guertin.cpp
+++ b/CST116F2021-Lab3/CST116F2021-Lab3-Guertin.cpp
@@ -25,6 +25,56 @@ CST116 C++
7.2 pg 155 #1
-
+#include <iostream>
+#include<math.h>
+#include<iomanip>
+#include <string>
+using std::cout;
+using std::endl;
+using std::string;
+
+
+int main()
+{
+
+ int money;
+ int accounts;
+
+ //take the number of accounts
+ cout << "How many accounts do you have with us today?\n";
+ std::cin >> accounts;
+
+ //take the money amount
+ cout << "How much money do you have in your account(s)?\n $";
+ std::cin >> money;
+
+ //if x>=25,000 is platinum
+ //if 10,000<x<25,000 and 2 accounts is gold
+ // if x>10,000 but only 1 account is silver
+ //if x<=10,000 is copper
+
+ if ((money >= 25000) & (accounts == 2)) {
+ cout << "You are a Platinum member!";
+ }
+ else if ((money >= 25000) & (accounts == 1)) {
+ cout << "You are a Platinum member!";
+ }
+ else if (((10000 < money) && (money < 25000)) & (accounts > 1)) {
+ cout << "You are a Gold member!";
+ }
+ else if (((10000 < money) && (money < 25000)) & (accounts == 1)) {
+ cout << "You are a Silver member";
+ }
+ else if ((money <= 10000) & (accounts == 2)) {
+ cout << "You are a Copper member";
+ }
+ else if ((money <= 10000) & (accounts == 1)) {
+ cout << "You are a Copper member";
+ }
+ return 0;
+}
+
+5b 7.4 pg 161 #1
+