#include #include const int COL_WIDTH = 5; using namespace std; int main() { bool a {true}, b {false}; bool c = true; cout << "a = " << a << endl; cout << "b = " << b << endl; a = true; b = true; c = a and b; cout << " A B A and B" << endl; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << b << setw(COL_WIDTH) << c << endl; a = true; b = false; c = a and b; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << b << setw(COL_WIDTH) << c << endl; a = false; b = true; c = a and b; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << b << setw(COL_WIDTH) << c << endl; a = false; b = false; c = a and b; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << b << setw(COL_WIDTH) << c << endl; cout << endl << endl; a = true; b = true; c = a or b; cout << " A B A or B" << endl; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << b << setw(COL_WIDTH) << c << endl; a = true; b = false; c = a or b; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << b << setw(COL_WIDTH) << c << endl; a = false; b = true; c = a or b; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << b << setw(COL_WIDTH) << c << endl; a = false; b = false; c = a or b; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << b << setw(COL_WIDTH) << c << endl; cout << endl << endl; cout << " A NOT A" << endl; a = true; c = not a; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << c << endl; a = false; c = not a; cout << setw(COL_WIDTH) << a << setw(COL_WIDTH) << c << endl; return 0; } /* { indented indented indented { indented indented } indented { indented indented indented { indented indented } } indented } if (today is a work day) go to work else stay home if (today is a work day) go to work else stay home eat dinner if (today is a work day) { get dressed for work go to work } else { get dressed for home stay home } */