Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // how to generalize this?? one function for n inputs
- void showOutsFor2(){
- cout << "all possible combinations for two outupts" << endl;
- cout << "A\t|\tB " << endl;
- cout << "---------" << endl;
- for(int i = 0 ; i < 2; i++)
- for(int j = 0; j < 2; j ++)
- cout << i << "\t \t" << j << endl;
- }
- void showOutsFor3(){
- cout << "all possible combinations for three outupts" << endl;
- cout << "A\t|\tB\t|\tC" << endl;
- cout << "------------------" << endl;
- for(int i = 0 ; i < 2; i++)
- for(int j = 0; j < 2; j ++)
- for(int k = 0; k < 2; k++)
- cout << i << "\t \t" << j << "\t \t" << k << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement