error C2065: 'P' : undeclared identifier在c语言中是什么意思

#include<stdio.h>
int main()
{
int s;
float p,w,d,f;
printf("please enter price,weight,discount:");
scanf("%f,%f,%d",&P,&w,&s);
if(S>=3000)d=15;
else if(s>=2000)d=10;
else if(s>=1000)d=8;
else if(s>=500)d=5;
else if(s>=250)d=2;
else d=0;
f=p*w*s*(1-d/100);
printf("freight=%10.2f\n",f);
return 0;
}
错误是error C2065: 'P' : undeclared identifier,怎么错了?

scanf("%f,%f,%d",&P,&w,&s);//输入p时 大小写写错了,写成大写P了

这句话意思是 P未定义
温馨提示:答案为网友推荐,仅供参考
第1个回答  2018-03-12
鹦鹉奇缘《踏青》:闲阶桃花次第开,昨日踏青小约未应乖。付嘱东邻女伴少待莫相催,着得凤头鞋子即当来。
相似回答