-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1051.cpp
More file actions
38 lines (28 loc) · 789 Bytes
/
1051.cpp
File metadata and controls
38 lines (28 loc) · 789 Bytes
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
33
34
35
36
37
38
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double renda, renda2, imposto;
cin >> renda;
cout << fixed << setprecision(2);
if ( renda > 0.00 and renda <= 2000.00) {
cout << "Isento" << endl;
}
else if ( renda >= 2000.01 and renda <= 3000.00) {
renda2 = renda - 2000.01;
imposto = (renda2 * 8) / 100;
cout << "R$ " << imposto << endl;
}
else if ( renda >= 3000.01 and renda <= 4500.00) {
renda2 = renda - 3000.01;
imposto = 80 + (renda2 * 0.18);
cout << "R$ " << imposto << endl;
}
else if ( renda > 4500.00) {
renda2 = renda - 4500.00;
imposto = 80 + 270 + (renda2 * 0.28);
cout << "R$ " << imposto << endl;
}
return 0;
}