#include<stdio.h> #define Height 10 int calculate(int Width, int Long); int main() { int l_long; int l_width; int result; printf("长方形的高度为: %d\n",Height); printf("请输入长度: \n"); scanf("%d",&l_long); printf("请输入宽度: \n"); scanf("%d,&l_width); result=calculate(l_long,l_width); printf("长方形的体积是: \n"); printf("%d\n",result); return 0; } int calculate(int Long, int Width) { int result=Long*Width*Height; return result; } 看书看了半天,我刚学,谁来解释一下,错在那里啊,VC6.0这样说: --------------------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' 执行 cl.exe 时出错. calculate.obj - 1 error(s), 0 warning(s) 还是错了啊。
莫回无
尚方宝剑之说
相关分类