#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; }
HDU2000
最新推荐文章于 2022-03-31 18:19:49 发布