新手求助,麻烦大神给指点一下,谢谢,在线等答案。
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;
}
弹出这样的错误
--------------------Configuration: kaishi - Win32 Debug--------------------
Compiling...
kaishi.c
D:\xuexi\kaishi\kaishi.c(6) : warning C4013: 'printf' undefined; assuming extern returning int
D:\xuexi\kaishi\kaishi.c(7) : warning C4013: 'scanf' undefined; assuming extern returning int
kaishi.obj - 0 error(s), 2 warning(s)
代码开头加一句:
# include <stdio.h> qiuyouzhi 发表于 2021-3-7 11:13
代码开头加一句:
谢谢!
页:
[1]