Description
从键盘输入两个整数x,y,按从小到大的顺序输出它们的值。
Input
输入两个整数x,y。
Output
按从小到大的顺序输出它们的值。数据之间以空格间隔。
Sample Input
20 16
Sample Output
16 20
HINT
...
Source
#include<stdio.h>
int main(void)
{
int a, b, temp;
scanf("%d%d", &a, &b);
if(a > b ) //若a>b,则交换a和b中内容
{
temp = a; //将a中内容咱存入temp
a = b; //将b中内容存入a中
b = temp; //将temp中内容存入b中
}
printf("%d %d\n", a, b);
return 0;
}