aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk2/lab2/greektax.cpp
blob: c1507d1a3938c17beb0ad8bfee88c4e0d10433a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
    if (k10<=0){
    Tax+=((Income-10000)*.1);
  }
    else {
      Tax+=2000;
    }
    if (Income>30000) {
      int k30=Income-10000;
      if (k30<=0){
      Tax+=((Income-30000)*.2);
    }
      else {
        Tax+=8000;
      }
      if (Income>70000) {
        Tax+=((Income-70000)*.3);
      }
    }
  }
  cout << "You owe " << Tax << " drachmas in tax." << endl;

}