// Prog: assertion.cpp // use assertions to check De Morgan's laws #include int main() { bool x; // whatever x and y actually are, bool y; // De Morgan's laws will hold: assert ( !(x && y) == (!x || !y) ); assert ( !(x || y) == (!x && !y) ); return 0; }