Advertisement
johnsubira

Randoming

Feb 25th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <ctime>
  3. #include <cstdlib>
  4. #include <algorithm>
  5. using namespace std;
  6.  
  7.  
  8. int z;
  9. int main()
  10. {
  11. int x;
  12. z=0;
  13. z++;
  14. cout<<"\t ***GROUP:"<<z<<"***"<<endl;
  15. std::string name[3] = {"\t PURE", "\t FAKE", "\t FAKE"};
  16. std::sort(name,&name[3]);
  17.  
  18. int y= 1;
  19. do{
  20. std::cout<<"R:"<<y;
  21. for( x = 0; x < 3; x++ )
  22. {
  23. std::cout<<name[x];
  24. if (x < 3 - 1)std::cout<<"";
  25. }
  26.  
  27. y++;
  28. std::cout<<std::endl;
  29. }while(next_permutation(name,&name[3]));
  30.  
  31.  
  32.  
  33. system("pause");
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement