Computer Science
21 Online
OpenStudy (bahrom7893):
Guys need your help again
Join the QuestionCove community and study together with friends!
Sign Up
OpenStudy (bahrom7893):
I have to determine if this is true (a = 5, b=2):
Is
!(a*b)
true?
OpenStudy (bahrom7893):
but what is:
!(a*b), actually let me check my notes haha
OpenStudy (amistre64):
looks like not(a*b) to me :/
OpenStudy (bahrom7893):
yea but what is not (a*b), that's what i dont get
OpenStudy (anonymous):
a * b = 10 = true
!(10) = false
(not)(true)
Join the QuestionCove community and study together with friends!
Sign Up
OpenStudy (bahrom7893):
ohh lol nice!
OpenStudy (bahrom7893):
so anything !(a+b), etc.. will all be false?
OpenStudy (amistre64):
if (a == 5 && b == 2) {cout<<"true"}; perhaps not :)
OpenStudy (bahrom7893):
I don't know python and i'm just takin C++ and this is my 2nd week so for !(c%b) that would also be false?
Join the QuestionCove community and study together with friends!
Sign Up
OpenStudy (anonymous):
amistre64 that is not boolean logic.
OpenStudy (bahrom7893):
% is modular division
OpenStudy (bahrom7893):
c=4 b=2
OpenStudy (bahrom7893):
true
OpenStudy (bahrom7893):
it will be true.. since:
(4%2) <= false
Join the QuestionCove community and study together with friends!
Sign Up
OpenStudy (bahrom7893):
not(false) <=true, right?
OpenStudy (anonymous):
4%2=0=false
not false
true
OpenStudy (bahrom7893):
i see tnx guys
OpenStudy (amistre64):
Boole is dead by now; i tend to use amistre64-ean logic :)
Join the QuestionCove community and study together with friends!
Sign Up
OpenStudy (anonymous):
Boole will always be alive in our hearts ;)
OpenStudy (bahrom7893):
what the heck is this?
OpenStudy (bahrom7893):
c % b * a && a % c * b
OpenStudy (bahrom7893):
c%b is false
false*a is false*true is false
OpenStudy (anonymous):
What are the values of a, c, and b?
Join the QuestionCove community and study together with friends!
Sign Up
OpenStudy (bahrom7893):
false and a%c * b
false and true * true
false and true
true
OpenStudy (bahrom7893):
a=5
b=2
c=4
OpenStudy (anonymous):
false AND true = false
OpenStudy (bahrom7893):
woops sorry meant false haha
OpenStudy (anonymous):
yes, you got it. :)
Join the QuestionCove community and study together with friends!
Sign Up
OpenStudy (bahrom7893):
what is false OR true?
OpenStudy (bahrom7893):
true?
OpenStudy (anonymous):
True
OpenStudy (bahrom7893):
ok tnx.. hold on double check my assignment..will post a new thread