Must be a new computer virus. Or why not try out a math forum.
2007-06-13 19:46:01
·
answer #1
·
answered by Roy C 4
·
0⤊
0⤋
|| is "or" right?, I sort of forgot. The difference is for && to be true both of the conditions should be satsfied. But for || to be true one or both of the conditions can be satsfied. And man the difference really matters. For eg. Username and password require "&&". But for something optional like, let's say, the user has to give his email id and/or his phone no, or can be used.
2007-06-14 02:55:25
·
answer #2
·
answered by venkat_the_great 2
·
0⤊
0⤋
I think you mean
(a>b) && (a>c)
(a>b) || (a>c)
&&=and
||=or
you need to look at a truth table
For and
false and false = false
false and true = false
true and false = false
true and true = true
For or
false or false = false
false or true = true
true or false = true
true or true = true
You can also substitute the false for 0 and the true for 1.
2007-06-14 02:49:47
·
answer #3
·
answered by AnalProgrammer 7
·
0⤊
0⤋
First one is a "AND" condition, meaning the value to be true the both expressions must be true i.e. a>b and a>c , then & then only the entire expression evaluates to true.
In other expression, if any one expressions evaluates to true the entire expression evaluates to true i.e. if a>b OR a>c.
2007-06-14 02:46:04
·
answer #4
·
answered by Vinay 1
·
0⤊
0⤋
(a>b) && (a>b) is true only when a is greater than b.
(a>b) || (a>c) is true when a is greater than b or a is greater than c.
when (a>b) && (a>b) is true, (a>b) || (a>c) is true.
but when (a>b) || (a>c) is true you can not say (a>b)&&(a>b) is true or false.
2007-06-14 03:11:09
·
answer #5
·
answered by virtualmatador 1
·
0⤊
0⤋