第五章最后的综合练习,请各位大神看一下,出问题了,该怎么处理,跪谢
#include <stdio.h>
int main()
{
int morning()
{
static int morningmile = 12;
float morningpay;
morningpay = 13 + (morningmile - 3)*2.3 + 1;
printf("小明早上打车费用为%d/n", morningpay);
return morningpay;
}
int afternoon()
{
extern int y;
int afternoonmile = y;
float afternoonpay;
afternoonpay = 13 + (afternoonmile - 3)*2.3 + 1;
printf("小明早上打车费用为%d/n", afternoonpay);
return afternoonpay;
}
int y = 12;
auto float allpay;
allpay = morningpay + afternoonpay;
printf("小明每天打车费用为%s/n", allpay);
return 0;
}
界面好像是说allpay = morningpay + afternoonpay;这一步出现了问题,该怎么改呢?
谢谢!