看你那么晚還在學習,幫你改一下:#include<stdio.h>intcalculate(intlng,intwidth,inthight)
;//函數參數不能用C語言的關鍵字longintmain(){intm_long;intm_width;intm_hight;intresult;printf("請輸入長度\n")
;scanf("%d",&m_long)
;printf("請輸入寬度\n")
;scanf("%d",&m_width)
;printf("請輸入高度\n")
;scanf("%d",&m_hight)
;result=calculate(m_long,m_width,m_hight)
;printf("長方體的體積是")
;printf("%d\n",result)
;getchar();getchar()
;return0;
}intcalculate(intlng,intwidth,inthight)//這里的分號要去掉{intresult=lng*width*hight;returnresult;}