fork(1) download
  1. #include <iostream>
  2. #include <cstring>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. string word;
  10. cout << "Podaj ciag znakow: ";
  11. cin >> word;
  12. cout << "Wszystkie mozliwe kombinacje ciagu " << word << " to:\n" << word << "\n";
  13. while(next_permutation(word.begin(),word.end()))
  14. cout << word << "\n";
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 2728KB
stdin
Standard input is empty
stdout
Podaj ciag znakow: Wszystkie mozliwe kombinacje ciagu  to: