-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuri1051.cpp
More file actions
52 lines (48 loc) · 1.03 KB
/
Copy pathuri1051.cpp
File metadata and controls
52 lines (48 loc) · 1.03 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
float input, x, y, z, output;
cin>>input;
if(input <= 2000.00)
{
cout<<"Isento"<<endl;
}
else
{
if(input > 2000.00 && input <= 3000.00)
{
x = input - 2000.00;
x = ((x*8)/100);
output = x;
}
else if(input > 3000.00 && input <= 4500.00)
{
x = input - 2000.00;
y = x - 1000.00;
x -= y;
x = ((x*8)/100);
y = ((y*18)/100);
output = x+y;
}
else
{
x = input - 2000.00;
y = x - 1000.00;
z = y - 1500.00;
x -= y;
y -= z;
x = ((x*8)/100);
y = ((y*18)/100);
z = ((z*28)/100);
output = x+y+z;
}
{
cout<<fixed;
cout<<setprecision(2);
cout<<"R$ "<<output<<endl;
}
}
return 0;
}