Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <new>
- using namespace std;
- int main ()
- {
- int i,j,k,m,n,y,x,z;
- cout << "What is the total size of the set? ";
- cin >> y;
- cout << "How many would you like to choose from the set?";
- cin >> x;
- i=y;
- j=i-1;
- k=1;
- m=1;
- z=y;
- if (y == 0 || x==0)
- cout << "Sorry but you can't enter 0's prof.";
- else
- {
- for ( n=y; n>=1, m<=y;)
- {
- for ( i; i>=1; )
- {
- cout << i << ",";
- for ( k; k<x; )
- {
- cout << m << ",";
- ++k;
- }
- cout << "|";
- k=1;
- --i;
- }
- cout << endl;
- ++m;
- --n;
- }
- }
- cin.get();
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment