#include <stdio.h>
int main()
{ int prize,length,TIME;
if (length<=3)
{
prize==13+1;
return prize;
}
else if(TIME>5&&TIME<=23)
{
prize==(13+1+length*2.3);
return prize;
}
else
{
prize=(13+1+length*2.3*1.2);
return prize;
}
int times;
length=12;
TIME=9;
times=2;
prize+=times;
printf("费用为%d\n",prize);
return 0;
}
你前两个prize那边写了两个"="号了,在编程语言里面“==”是判断两边是否相等,一个“=”才是把右边的值赋值给左边。
==多了吧?
呵呵呵