本人小白有一些问题
#include<stdio.h>#define Height 10
int calculate(int Long,int Width);
int main()
{
int m_Long;
int m_Width;
int result;
printf("长方体的高度为:%d\n",Height);
printf("请输入长度\n");
scanf("%d",&m_Long);
printf("请输入宽度\n");
scanf("%d"&m_Width);
result=calculate(m_Long,m_Width);
printf("长方形的体积是:");
printf("%d\n",result);
return 0;
}
int calculate(int Long,int Width);
{
int result=Long*Width*Height;
return result;
}
1.cpp
F:\C文件\长方形体积\1.cpp(16) : error C2296: '&' : illegal, left operand has type 'char [3]'
F:\C文件\长方形体积\1.cpp(25) : error C2447: missing function header (old-style formal list?)
执行 cl.exe 时出错.
1.exe - 1 error(s), 0 warning(s)