blob: 7da4aa64a1bc7e5e0eeef177d44218f572cd485a (
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
32
|
#include <iostream>
using namespace std;
int main () {
int income;
int tax=0;
cout << "Εισάγετε το εισόδημά σας: ";
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 << "Χρωστάς " << tax << " δραχμές." << endl;
}
|