我调用的函数没有声明?
#include <stdio.h>
double getMoney(int distance,int hours)
{
double totalMoney = 0.00;
double per=2.30;
double sta=13.00;
if(hours<0 || hours >24)
{
printf("请输入正确的数字: ");
return 0;
}
else if(hours>5 && hours <=23)
{
per *= 1.2;
}
if(distance<=3)
{
totalMoney = sta;
}
else
{
totalMoney=sta+(distance - 3)*per;
}
totalMoney++;
return totalMoney;
}
int main ()
{
double totalMoney;
int mor=9;
int aft=18;
int distance=12;
double per=2.30;
totalMoney=getMoney(distance,mor)+gerMoney(distance,aft); //这里 编译器说 getMoney没有声明
printf("小明的搭车费用为:%.2f\n",totalMoney);
return 0;
}