题目描述
打这道题的时候犯的小错误太多。
样例
#include<stdio.h>
int main()
{
double a=4.00,b=4.50,c=5.00,d=2.00,e=1.50;
int x,y;
double X;
scanf("%d%d",&x,&y);
if(x==1)
{
X=a*y;
printf("Total: R$ %.2lf\n",X);
}
if(x==2)
{
X=b*y;
printf("Total: R$ %.2lf\n",X);
}if(x==3)
{
X=c*y;
printf("Total: R$ %.2lf\n",X);
}if(x==4)
{
X=d*y;
printf("Total: R$ %.2lf\n",X);
}if(x==5)
{
X=e*y;
printf("Total: R$ %.2lf\n",X);
}
return 0;
}