|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 青衿 于 2015-12-7 22:19 编辑
C:\Users\lin\Desktop\未命名14.c In function 'max':
6 2 C:\Users\lin\Desktop\未命名14.c [Error] expected declaration specifiers before 'printf'
7 2 C:\Users\lin\Desktop\未命名14.c [Error] expected declaration specifiers before 'scanf'
8 2 C:\Users\lin\Desktop\未命名14.c [Error] expected declaration specifiers before 'z'
9 2 C:\Users\lin\Desktop\未命名14.c [Error] expected declaration specifiers before 'printf'
11 1 C:\Users\lin\Desktop\未命名14.c [Error] expected declaration specifiers before '}' token
14 1 C:\Users\lin\Desktop\未命名14.c [Error] expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
16 1 C:\Users\lin\Desktop\未命名14.c [Error] expected '{' at end of input
C:\Users\lin\Desktop\未命名14.c In function 'main':
16 1 C:\Users\lin\Desktop\未命名14.c [Error] expected declaration or statement at end of input
31 C:\Users\lin\Desktop\Makefile.win recipe for target '未命名14.o' failed
- 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("maxmum=%d",z);
- }
- int max(int a,int b)
- {
- if(a>b)return a;else return b;
- }
复制代码 |
|