2022w03
作者:
芈安宁
,
2022-10-31 21:05:45
,
所有人可见
,
阅读 222
672 交税
------------------
#include<iostream>
using namespace std;
#include<iomanip>
int main()
{
double x;//以后小数问题尽量都用c++!老c七四老字了
cin >> x;
cout<< fixed << setprecision(2);
if (0 <= x && x <= 2000.00)cout << "Isento";
else if (x >= 2000.01 && x <= 3000.00)
cout<< "R$ " << (x - 2000.00) * 0.08;//两位小数
else if (x >= 3000.01 && x <= 4500.00)
cout << "R$ " << (x - 3000.00) * 0.18 + 80;
else if (x > 4500.00)
cout<< "R$ " << (x - 4500.00) * 0.28 + 350;
return 0;
}