SOLUTION: This might not be the right section, but here it goes: I'm taking a C++ programming class now and they just skimmed over reviewing math. What does the following mean in a pro

Algebra ->  Equations -> SOLUTION: This might not be the right section, but here it goes: I'm taking a C++ programming class now and they just skimmed over reviewing math. What does the following mean in a pro      Log On


   



Question 48574: This might not be the right section, but here it goes: I'm taking a C++ programming class now and they just skimmed over reviewing math.
What does the following mean in a problem?
&&
== // I think I got this, means 'is exactly equal to'.
the ! in !(blah blah blah)
and ll (two vertical lines)
Thanks,
John

Answer by longjonsilver(2297) About Me  (Show Source):
You can put this solution on YOUR website!
&& is a Boolean AND
|| is a Boolean OR
meaning the "calculation" is either TRUE (=1) or FALSE(=0).

! is NOT

eg IF time is equal to (hours<24) and (minutes<60)
THEN ...

this is to test a time is of the correct 24 hour format.

in C++ we would do something like:
(hours<24) && (minutes<60)

so a time of 12:71 would have hours as TRUE --> 1 but minutes is FALSE --> 0 and hence a would be FALSE since (1 AND 0) is 0

Similarly, || is the OR equivalent to AND's &&

NOT:
a!=12.5 means a is not equal to 12.5

Jon.