qwe asd zxc
e q w a d s c x z
#include<iostream> #include<algorithm> using namespace std; int main() { char ls[4]; while(cin>>ls[0]>>ls[1]>>ls[2]) { sort(ls,ls+3);cout<<ls[0]<<" "<<ls[1]<<" "<<ls[2]<<endl; } return 0; }
原文地址:http://blog.csdn.net/lsgqjh/article/details/44949665