One of states the following:
not(A) and not(B) is equivalent to not(A or B).
Write a program that outputs the equivalence above as a C++ expression using the symbols A, B, !, (, ), &&, || and ==. You should output the expression four times on four separate lines. For the first line of output , A and B should both be true . For the second line, A should be true and B false . For the third line, A should be false and B true . For the fourth line, both A and B should be false . If your expressions are correct, all four lines should output 1 (meaning true ). You won't receive credit unless you produce the desired output in the manner specified above. (So don't just type cout << "1" << endl; four times! )
it is a question in myprogramminglab, but i have no idea about this one, can u guys help me.
thx
Usually people won't help you if you just post a prompt and say "help I have no idea".
Show actual code you're having trouble with, the directions seem pretty explicit, although it sounds like it's given you a bit of freedom to choose what your test statements should be. If you really have no idea, I would searching up on how booleans work in C++, and how the !, !, &&, || and == operators work.
Doing std::cout << 2 + 3 == 5 << std::endl; will display 1. You are supposed to change this so that it shows DeMorgan's law in usage, using C++'s logic operators symbols instead of just "not" and "and".