作者:yunjinqi 类别:
日期:2023-05-31 10:37:25
阅读:460 次 消耗积分:0 分
#include <stdio.h>
#include <math.h>
int main(){
double money,result=0.0;
if (scanf("%lf",&money)!=EOF){
// printf("%f %f %f",money,year,rate);
if (money<=1600){result=0.0;}
if (1600 < money && money <= 2500){result=(money-1600)*0.05;}
if (2500 < money && money <= 3500){result=(money-1600)*0.1;}
if (3500 < money && money <= 4500){result=(money-1600)*0.15;}
if (money > 4500){result=(money-1600)*0.2;}
printf("%.2f",result);
}else{
printf("input wrong");
}
return 0;
}