#include
int main(void)
{
int electric,money;
printf("请输入用电量:");
scanf("%d",&electric);
if(electric<=50)
{
money=electric*0.53;
}
else
{
money=50*0.53+(0.53+0.05)*(electric-50);
}
printf("电费:%d元\n",money);
return 0;
}
#include
int main(void)
{
int electric,money;
printf("请输入用电量:");
scanf("%d",&electric);
if(electric<=50)
{
money=electric*0.53;
}
else
{
money=50*0.53+(0.53+0.05)*(electric-50);
}
printf("电费:%d元\n",money);
return 0;
}