mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 03:31:59 +00:00
672. 税
https://www.acwing.com/problem/content/submission/code_detail/6826847/
This commit is contained in:
parent
34d225bd06
commit
7321d1de16
18
AcWing/672/672.cpp
Normal file
18
AcWing/672/672.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
double x;
|
||||
cin >> x;
|
||||
if (0.00 <= x && x <= 2000.00) {
|
||||
cout << "Isento" << endl;
|
||||
} else if (2000.01 <= x && x <= 3000.00) {
|
||||
cout << "R$ " << fixed << setprecision(2) << (x - 2000.00) * 0.08 << endl;
|
||||
} else if (3000.01 <= x && x <= 4500.00) {
|
||||
cout << "R$ " << fixed << setprecision(2) << (1000.00 * 0.08) + (x - 3000.00) * 0.18 << endl;
|
||||
} else {
|
||||
cout << "R$ " << fixed << setprecision(2) << (1000.00 * 0.08) + (1500 * 0.18) + (x - 4500) * 0.28 << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user