Truth Table

Please Give me C++ source code to create a truth table for any No. of variables

For Example: for 3 variables truth table should be as

0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
*Hands shahbazsaleem the source code for the best truth table ever!* Shhh! Don't tell anyone ;)

In all honesty, start here: http://www.cplusplus.com/doc/tutorial/operators/
Topic archived. No new replies allowed.