|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
文本
int max(int a,int b);
main()
{
int x,y,z;
int max(int a,int b);
printf("input two numbers:\n");
scant ("%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;
}
错误
C:\Users\Administrator\Desktop\book\no2..c In function 'main':
6 2
C:\Users\Administrator\Desktop\book\no2..c [Warning] incompatible implicit declaration of built-in function 'printf'
C:\Users\ADMINI~1\AppData\Local\Temp\ccm7x541.o no2..c:(.text+0x2f): undefined reference to `scant'
C:\Users\Administrator\Desktop\book\collect2.exe [Error] ld returned 1 exit status
- #include <stdio.h>
- int max(int a,int b);
- int main()
- {
- int x,y,z;
- int max(int a,int b);
- printf("input two numbers:");
- scanf("%d%d\n",&x,&y);
- z = max(x,y);
- printf("maxmum=%d\n",z);
- }
- int max(int a,int b)
- {
- if(a>b)
- return a;
- else
- return b;
- }
复制代码
|
|