Guest User

Untitled

a guest
Jun 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <new>
  4. using namespace std;
  5.  
  6. int main ()
  7. {
  8. int i,j,k,m,n,y,x,z;
  9.  
  10. cout << "What is the total size of the set? ";
  11. cin >> y;
  12. cout << "How many would you like to choose from the set?";
  13. cin >> x;
  14.  
  15. i=y;
  16. j=i-1;
  17. k=1;
  18. m=1;
  19. z=y;
  20.  
  21. if (y == 0 || x==0)
  22. cout << "Sorry but you can't enter 0's prof.";
  23. else
  24. {
  25.  
  26. for ( n=y; n>=1, m<=y;)
  27. {
  28. for ( i; i>=1; )
  29. {
  30. cout << i << ",";
  31.  
  32. for ( k; k<x; )
  33. {
  34. cout << m << ",";
  35.  
  36. ++k;
  37. }
  38. cout << "|";
  39.  
  40. k=1;
  41. --i;
  42. }
  43. cout << endl;
  44. ++m;
  45. --n;
  46. }
  47. }
  48.  
  49. cin.get();
  50. system("pause");
  51. return 0;
  52. }
Add Comment
Please, Sign In to add comment