第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

如下所示,在執(zhí)行 cl.exe 時(shí)出錯(cuò),該怎么解決呢?

如下所示,在執(zhí)行 cl.exe 時(shí)出錯(cuò),該怎么解決呢?

C
開(kāi)心每一天1111 2022-04-20 15:15:53
#include<stdio.h> #define Height 10 int calculate(int Width, int Long); int main() { int l_long; int l_width; int result; printf("長(zhǎng)方形的高度為: %d\n",Height); printf("請(qǐng)輸入長(zhǎng)度: \n"); scanf("%d",&l_long); printf("請(qǐng)輸入寬度: \n"); scanf("%d,&l_width); result=calculate(l_long,l_width); printf("長(zhǎng)方形的體積是: \n"); printf("%d\n",result); return 0; } int calculate(int Long, int Width) { int result=Long*Width*Height; return result; } 看書看了半天,我剛學(xué),誰(shuí)來(lái)解釋一下,錯(cuò)在那里啊,VC6.0這樣說(shuō): --------------------Configuration: Hello - Win32 Debug-------------------- Compiling... calculate.c C:\Documents and Settings\Administrator\桌面\calculate.c(13) : error C2001: newline in constant C:\Documents and Settings\Administrator\桌面\calculate.c(14) : error C2146: syntax error : missing ')' before identifier 'result' 執(zhí)行 cl.exe 時(shí)出錯(cuò). calculate.obj - 1 error(s), 0 warning(s) 還是錯(cuò)了啊。
查看完整描述

2 回答

?
莫回?zé)o

TA貢獻(xiàn)1865條經(jīng)驗(yàn) 獲得超7個(gè)贊

#include<stdio.h>
#define
Height
10
int
calculate(int
Width,
int
Long);
int
main()
{
int
l_long;
int
l_width;
int
result;
printf("長(zhǎng)方形的高度為:
%d\n",Height);
printf("請(qǐng)輸入長(zhǎng)度:
\n");
scanf("%d",&l_long);
printf("請(qǐng)輸入寬度:
\n");
scanf("%d,&l_width);//忘記加雙引號(hào)了scanf("%d",&l_width);
result=calculate(l_long,l_width);
printf("長(zhǎng)方形的體積是:
\n");
printf("%d\n",result);
return
0;
}
int
calculate(int
Long,
int
Width)
{
int
result=Long*Width*Height;//你這個(gè)地方改成先定義再計(jì)算,分開(kāi)寫,int
result;
result=Long*Width*Height;
return
result;
}
//其它的你再你電腦上檢查有沒(méi)有大小寫錯(cuò)誤就行了



查看完整回答
反對(duì) 回復(fù) 2022-04-24
?
尚方寶劍之說(shuō)

TA貢獻(xiàn)1788條經(jīng)驗(yàn) 獲得超4個(gè)贊

#include<stdio.h>
#define
Height
10
int
calculate(int
Width,
int
Long);
int
main()
{
int
l_long;
int
l_width;
int
result;
printf("長(zhǎng)方形的高度為:
%d\n",Height);
printf("請(qǐng)輸入長(zhǎng)度:
\n");
scanf("%d",&l_long);
printf("請(qǐng)輸入寬度:
\n");
scanf("%d",&l_width);//
result=calculate(l_long,l_width);
printf("長(zhǎng)方形的體積是:
\n");
printf("%d\n",result);
return
0;
}
int
calculate(int
Long,
int
Width)//
{
int
result=Long*Width*Height;
return
result;
}



查看完整回答
反對(duì) 回復(fù) 2022-04-24
  • 2 回答
  • 0 關(guān)注
  • 262 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)