#include <stdio.h>
int main()
{
int max(int x,int y,int z);
int a,b,c,d;
scanf("%d %d %d",&a,&b,&c);
d=max(a,b,c);
if(a==d)
{
if(b>c)
printf("%d->%d->%d",c,b,d);
else
printf("%d->%d->%d",b,c,d);
}
if(b==d)
{
if(a>c)
printf("%d->%d->%d",c,a,d);
else
printf("%d->%d->%d",a,c,d);
}
if(c==d)
{
if(a>b)
printf("%d->%d->%d",b,a,d);
else
printf("%d->%d->%d",a,b,d);
}
return 0;
}
int max(int x,int y,int z)
{
int M;
if(x>y)
M=x;
else
M=y;
if(M>z)
return(M);
else
M=z;
return(M);
}
a.c: In function ‘main’:
a.c:6:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d",&a,&b,&c);
^~~~~~~~~~~~~~~~~~~~~~~~~~
请问各位大佬为什么会出现这种情况?并且请问各位大佬如何解决?求教!!!