HDU2000

来源:互联网 发布:2017淘宝总额 编辑:程序博客网 时间:2024/04/30 02:33
#include <stdio.h>#include <stdlib.h>int main(){    char a[3],temp;    while(scanf("%s",&a)!=EOF)//不会读取回车    {        if (a[0] > a[1])            {temp = a[0];            a[0] = a[1];            a[1] = temp;}        if (a[0] > a[2])            {temp = a[0];            a[0] = a[2];            a[2]= temp;}        if (a[1] > a[2])            {temp = a[1];            a[1] = a[2];            a[2] = temp;}        printf("%c %c %c\n",a[0],a[1],a[2]);    }    return 0;}
0 1
原创粉丝点击