一个scanf函数需要输入两次数字
#include<stdio.h>int main()
{
int a,b,c;
int max,middle,min;
scanf("%d %d %d ",&a,&b,&c);
if(a>b&&a>c)
{
max=a;
if(b>c)
{
middle=b;
min=c;
}
else
{
middle=c;
min=b;
}
}
if(b>a&&b>c)
{
max=b;
if(a>c)
{
middle=a;
min=c;
}
else
{
middle=c;
min=a;
}
}
if(c>a&&c>b)
{
max=c;
if(b>a)
{
middle=b;
min=a;
}
else
{
middle=a;
min=b;
}
}
printf("max=%d middle=%d min=%d\n",max,middle,min);
}