Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main(int argc, char *argv[]){
- string input;
- // get input
- cout << "Please enter a word: ";
- cin >> input;
- cout << endl;
- sort(input.begin(), input.end());
- do
- cout << input << endl;
- while(next_permutation(input.begin(), input.end()));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement