#include <iostream>
#include <algorithm>
using namespace std;
int main ()
{
string s = "imtiyaz";
while(next_permutation(s.begin(),s.end()))
cout<<s<<endl;
return 0;
}
#include <algorithm>
using namespace std;
int main ()
{
string s = "imtiyaz";
while(next_permutation(s.begin(),s.end()))
cout<<s<<endl;
return 0;
}
It'd be more helpful if you show how will be the output :)
ReplyDelete