eolymp
bolt
Try our new interface for solving problems
Problems

Sort the letters

published at 1/9/24, 5:24:45 pm

include <iostream>

include <algorithm>

using namespace std; int main(){ string a; cin>>a; sort(a.begin(),a.end()); cout<<a<<" "<<endl; sort(a.rbegin(),a.rend()); cout<<a<<" "<<endl; }

published at 4/29/24, 8:13:27 pm

include <iostream>

include <algorithm>

include <string>

using namespace std; int main() { string input; cin >> input;

sort(input.begin(), input.end());
cout << input<<endl;

sort(input.rbegin(), input.rend());
cout << input <<endl;

return 0;

} olaaaaaaaaay