AcWing 672. 税
原题链接
简单
作者:
Value
,
2020-09-08 18:04:05
,
所有人可见
,
阅读 339
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
double wages; cin >> wages;
double tag = 0;
if(wages <= 2000.0) cout << "Isento" << endl;
else if(wages <= 3000.0) printf("R$ %.2lf\n", (wages - 2000) * 0.08);
else if(wages <= 4500){
tag += 1000 * 0.08;
printf("R$ %.2lf\n", (wages - 3000) * 0.18 + tag);
}else{
tag += 1500 * 0.18 + 1000 * 0.08;;
tag += ((wages - 4500.0) * 0.28);
printf("R$ %.2lf\n", tag);
}
return 0;
}