|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
int max(int a,int b);
main()
{
int x,y,2;
intmax(int a,int b);
printf("input two numders;\n");
scanf("%d%d",&x,&y);
z=max(x,y);
printf(maxmum=%d"z);
}
int max(int a,int b)
{
if(a>b)return a;else return b;
}
--------------------Configuration: Hello warld - Win32 Debug--------------------
Compiling...
Hello warld.c
C:\桌面\Hello warld\Hello warld.c(5) : error C2059: syntax error : 'constant'
C:\桌面\Hello warld\Hello warld.c(6) : warning C4013: 'intmax' undefined; assuming extern returning int
C:\桌面\Hello warld\Hello warld.c(6) : error C2143: syntax error : missing ')' before 'type'
C:\桌面\Hello warld\Hello warld.c(6) : error C2059: syntax error : ')'
C:\桌面\Hello warld\Hello warld.c(7) : warning C4013: 'printf' undefined; assuming extern returning int
C:\桌面\Hello warld\Hello warld.c(8) : warning C4013: 'scanf' undefined; assuming extern returning int
C:\桌面\Hello warld\Hello warld.c(9) : error C2065: 'z' : undeclared identifier
C:\桌面\Hello warld\Hello warld.c(10) : error C2065: 'maxmum' : undeclared identifier
C:\桌面\Hello warld\Hello warld.c(10) : error C2059: syntax error : '%'
C:\桌面\Hello warld\Hello warld.c(10) : error C2001: newline in constant
C:\桌面\Hello warld\Hello warld.c(16) : error C2181: illegal else without matching if
C:\桌面\Hello warld\Hello warld.c(16) : error C2065: 'b' : undeclared identifier
执行 cl.exe 时出错.
Hello warld.obj - 1 error(s), 0 warning(s)
第一次编辑
不知道哪里错了 求叫各位大大
|
|