Problem Description
輸入三個整數,找出其中的中間數。(這里的中間數指的是大小,不是位置。)
Input
輸入3個整數。
Output
輸出中間數。
Example Input
1 2 3
Example Output
2
#include<stdio.h>
int main()
{
int a,b,c;
int t;
scanf("%d %d %d",&a,&b,&c);
if(b>a)
{
t=a;
a=b;
b=t;
}
if(c>a)
{
t=a;
a=c;
c=t;
}
if(c>b)
{
t=b;
b=c;
c=t;
}
printf("%d",b);
return 0;
}
