|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
我没有用甲鱼大大的vc6,因为我没有在论坛找到视频中下载软件的地方,所以我用的是大学里面老师发的c-free,但是应该都一样吧?
我打的代码应该和他在视频中的代码一模一样
int max(int a,int b);
main()
{
int x,y,z
int max(int a,int b);
printf("input two numbers:\n");
scanf("%d%d",&x,&y);
z=max(x,y);
printf("maxmun=%d",z);
}
int max(int a,int b)
{
if(a>b)return a;else return b;
}
然后下面提升我 parse error before ‘int’
implicit declaration of fuction ‘int printf(...)’
这个应该怎么处理,新手小白,不喜勿喷
- #include <stdio.h>
- int max(int a, int b);
- main()
- {
- int x, y, z;
- int max(int a, int b);
- printf("input two numbers:\n");
- scanf("%d%d", &x, &y);
- z = max(x, y);
- printf("maxmun=%d", z);
- }
- int max(int a, int b)
- {
- if (a > b)
- return a;
- else
- return b;
- }
复制代码
|
|