#include<stdio.h>
int main()
{
int a;
scanf("%d",&a);
float b;
if(a>=0&&a<=200)
{
b=a*0.5;
printf("charge:%.2f",b);
}
else if(a>=200&&a<=400)
{
b=230+(a-400)*0.8;
printf("charge:%.2f",b);
}
else if(a>=601)
{
b=390+(a-600)*1.0;
printf("charfe:%.2f",b);
}
else
printf("input error!");
return 0;
}
网友评论