NYOJ41

描述:
现在要写一个程序,实现给三个数排序的功能
输入:
输入三个正整数
输出:
给输入的三个正整数排序

样例输入:
20 7 33
样例输出:
7 20 33

#include<stdio.h>
int main(){
    int a,b,c,t;
    scanf("%d%d%d",&a,&b,&c);
    if(a>b){t=a;a=b;b=t;}
    if(a>c){t=a;a=c;c=t;}
    if(b>c){t=b;b=c;c=t;}
    printf("%d %d %d
",a,b,c);
    return 0;
}         
原文地址:https://www.cnblogs.com/gwj1314/p/9445002.html