求大神指錯(cuò)
#include <stdio.h>
int main()
{
??? float cost(d,t)
??? if(d<=3)
??? {
??????? cost=14;
??? }
??? else
??? {
??????? if(t>=5 && t<23)
??????? {
??????????? cost=13+(d-3)*2.3+1;
??????? }
??????? else
??????? {
??????????? cost=13+(d-3)*2.3*1.2+1;
??????? }
??? }
??? return cost;
}
int main()
{
??? float total=cost(12,9)+cost(12,18);
??? printf("小明每天打車(chē)的總費(fèi)用為%f\n",total);
??? return 0;
}
2019-09-18
兩個(gè)main函數(shù)。。。。