求2个数中较大者 为什么我这个无法显示答案啊。我用的vs2010
#include<stdio.h>voidmain(){intmax(intx,inty);inta,b,c;scanf("%d,%d",&a,&b);c=max(a,b...
#include <stdio.h>
void main( )
{
int max(int x,int y);
int a, b, c;
scanf("%d,%d",&a,&b);
c=max(a,b);
printf("max=%d\n",c);
}
int max(int x,int y)
{
int z;
if(x>y) z=x;
else z=y;
return(z);
}
警告 1 warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\rever\documents\visual studio 2010\projects\wc.c\wc.c\cc.c 6 1 wc.c 展开
void main( )
{
int max(int x,int y);
int a, b, c;
scanf("%d,%d",&a,&b);
c=max(a,b);
printf("max=%d\n",c);
}
int max(int x,int y)
{
int z;
if(x>y) z=x;
else z=y;
return(z);
}
警告 1 warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\rever\documents\visual studio 2010\projects\wc.c\wc.c\cc.c 6 1 wc.c 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询