aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk2
diff options
context:
space:
mode:
authorMatthew Strapp <msattr@gmail.com>2019-02-13 15:31:12 -0600
committerMatthew Strapp <msattr@gmail.com>2019-02-13 15:31:12 -0600
commitbe79c197b87ca2ffaaa7c505ab4bf91d6e9fc135 (patch)
treec5eb120c3b76df0eb4615a684fb28e677d7ab051 /ee1301/wk2
parentThe strings were all Greek to me. (diff)
downloadhomework-be79c197b87ca2ffaaa7c505ab4bf91d6e9fc135.tar
homework-be79c197b87ca2ffaaa7c505ab4bf91d6e9fc135.tar.gz
homework-be79c197b87ca2ffaaa7c505ab4bf91d6e9fc135.tar.bz2
homework-be79c197b87ca2ffaaa7c505ab4bf91d6e9fc135.tar.lz
homework-be79c197b87ca2ffaaa7c505ab4bf91d6e9fc135.tar.xz
homework-be79c197b87ca2ffaaa7c505ab4bf91d6e9fc135.tar.zst
homework-be79c197b87ca2ffaaa7c505ab4bf91d6e9fc135.zip
Fix casiNg
Diffstat (limited to 'ee1301/wk2')
-rw-r--r--ee1301/wk2/lab2/greektax.cpp31
1 files 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 <iostream>
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;
}