#include<stdio.h>
int calculate(int lng, int width, int hight);//函數參數不能用C語言的關鍵字long
int main()
{
int m_long;
int m_width;
int m_hight;
int result;
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();
return 0;
}
int calculate(int lng, int width, int hight)//這裏的分號要去掉
{
int result=lng*width*hight;
return result;
}