求大神看下這代碼有什么問題?
#include <stdio.h>
int main()
{
? ? int a=12,b=13,c=9,p=0,i;
? ? float d=2.3;
? ? for(i=1,i<=2,i++)
? ? {
? ? if(c>5&&c<23)
? ? {
? ? ? ? p+=1+b+d*(a-3);
? ? ? ? return 0;
? ? }
? ? else
? ? {
? ? ? ? p+=1+b+d*1.2*(a-3);
? ? ? ? return 0;
? ? }
? ? c=18;
? ? }
? ? printf("小明每天打車的費(fèi)用是%f元",p);
}
2017-08-08
?for(i=1;i<=2;i++) 用分號(hào)不是逗號(hào)