From be79c197b87ca2ffaaa7c505ab4bf91d6e9fc135 Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Wed, 13 Feb 2019 15:31:12 -0600 Subject: Fix casiNg --- ee1301/wk2/lab2/greektax.cpp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/ee1301/wk2/lab2/greektax.cpp b/ee1301/wk2/lab2/greektax.cpp index f5d8ef3..c1507d1 100644 --- a/ee1301/wk2/lab2/greektax.cpp +++ b/ee1301/wk2/lab2/greektax.cpp @@ -1,32 +1,31 @@ #include using namespace std; int main () { - int income; - int tax=0; - cout << "Enter your income: "; - cin >> income; - if (income>10000) { - int k10=income-10000; + int Income; + int Tax=0; + cout << "Enter your Income: "; + cin >> Income; + if (Income>10000) { + int k10=Income-10000; if (k10<=0){ - tax+=((income-10000)*.1); + Tax+=((Income-10000)*.1); } else { - tax+=2000; + Tax+=2000; } - if (income>30000) { - int k30=income-10000; + if (Income>30000) { + int k30=Income-10000; if (k30<=0){ - tax+=((income-30000)*.2); + Tax+=((Income-30000)*.2); } else { - tax+=8000; + Tax+=8000; } - if (income>70000) { - tax+=((income-70000)*.3); + if (Income>70000) { + Tax+=((Income-70000)*.3); } } } - - cout << "You owe " << tax << " drachmas in tax." << endl; + cout << "You owe " << Tax << " drachmas in tax." << endl; } -- cgit v1.2.3