cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
DeMorgan's Theorem
DeMorgan's Theorem
Oct 1, 2008 at 5:44pm UTC
Sathed
(45)
I have to rebuild the following code using DeMorgan's Theorem for a class, but when I looked it up I was totally lost. Can any of you math geniuses out there lend me a hand?
1
2
if
(!(today == SUN || today == SAT)) cout <<
"\nGo to work!"
<< endl;
Last edited on
Oct 1, 2008 at 5:45pm UTC
Oct 1, 2008 at 6:40pm UTC
jsmith
(5804)
De Morgan's Theorem says that the expression
A and B
can be rewritten as
NOT ( NOT A or NOT B )
Let A be the expression ( today == SUN ) and B be the expression ( today == SAT ).
Oct 1, 2008 at 7:10pm UTC
Sathed
(45)
When you put it like that, it's all so easy...
Thanks!
Topic archived. No new replies allowed.