亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

我調用的函數沒有聲明?

#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;

}


正在回答

1 回答

你自己寫錯了啊totalMoney=getMoney(distance,mor)+getMoney(distance,aft);第二個函數調用你寫成gerMoney,我也是醉了。

0 回復 有任何疑惑可以回復我~
#1

一飛同學 提問者

汗。,
2016-01-15 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

我調用的函數沒有聲明?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號