#include <stdio.h>
int main(){
double x,cost,cost1,cost2;
scanf("%lf",&x);
if(x<0){
printf("Invalid Value!");
}
else if(x <= 50){
cost=x*0.53;
printf("cost = %.2f",cost);
}
else{
cost1=50*0.53;
cost2=(x-50)*0.58;
cost=cost1+cost2;
printf("cost = %.2f",cost);
}
return 0;
}
阶梯电价 收费
最新推荐文章于 2025-05-18 21:24:05 发布