程序找不到错误了,请大师们帮忙看看!
#include "stdio.h"void main()
{
int c,d;
float p,w,f,s;
sprintf("请输入货的单价,重量,距离:");
scanf("%f,%f,%f\n",&p,&w,&d);
if(d>=3000) c=12;
else c=d/250;
switch(c)
{
case 0:s=0;break;
case 1:s=2;break;
case 2:
case 3:
case 4:s=5;break;
case 5:
case 6:
case 7:
case 8:s=8;break;
case 9:
case 10:
case 11:s=10;break;
case 12:s=12;break;
}
f=p*w*d*(1-s/100.0);
printf("价格是:%10.2f\n",f);
}
编译时提示数据转换有可能遗失,帮我看看问题出在哪里啊!