新手求助!!
文本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 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 ld returned 1 exit status
本帖最后由 逃兵 于 2021-9-7 15:17 编辑
int main()
scanf() #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;
}
逃兵 发表于 2021-9-7 15:03
int main()
scanf()
谢谢了,兄弟
页:
[1]