将输入的字符一个一个读入 ASCII码排序

1.while (scanf("%s",&c)!=EOF)

2.ch=cin.get(); //或者cin.get(ch);经行循环

acm 

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int main(){
    char c[3],i;
    while (scanf("%s",&c)!=EOF)
    {
        sort(c, c + 3);
    cout << c[0] << " "<< c[1]<<" "<<c[2]<<endl;
    }
}