Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- // function to print string in sorted order
- void sortString(string &str)
- {
- sort(str.begin(), str.end());
- cout << str;
- }
- // Driver program to test above function
- int main()
- {
- string s ;
- cin>>s;
- sortString(s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement