救救孩子吧hello.c: In function 'price': hello.c:4:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'float' float hour(c) ^~~~~ hello.c:10:5: error: expected declaration specifiers before 'else' else ^~~~ hello.c:14:5: error: expect
include <stdio.h>
double price(a)
int way(b)
float hour(c)
double sum()
? ? if(b>3)
? ? {
? ? ? ? sum==13+(b-3)*a;
? ? }
? ? else
? ? {
? ? ? ?sum==13;
? ? }
? ? if(5=<c<23)
? ? {
? ? ? ? a==0.2a;
? ? }
? ? sum=sum+1;
int main()
{
? ? a==2.3;
? ? b==12;
? ? 9=<c=<18;
? ? printf("小明每天打車的總費(fèi)用%f\n",sum;
? ? return 0;
}
2020-02-17
不要寫==,==是判斷的語(yǔ)法,=才是賦值的語(yǔ)法。
還有你這個(gè)成員方法的定義方式很怪,應(yīng)該都是錯(cuò)的,你定義了4個(gè)成員方法,后面都沒(méi)有加{},也沒(méi)有加;,你復(fù)制全了嗎,怎么return都沒(méi)有