#Boolean operators in For Loops
1 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
j doesnt increment becuase it doesnt get checked against m
in the comparison the
i++ < l is true, so there is not a need to check for the right of the or
aka
no need to check
++j < m
if left hand side is true
but i is = 1
sorry for format, im on mobile
yeah i would be less than l
so you check the right side of the condition right
cause one side of the or is false
the right of the &&
yep
well because one side of the or is true*
if the left side was false how would it work
then it would check the right side of the ||
would you check the next condition or would you do the and operator and then compare it
since and has precedence over or
it would check ++j < m
im not aware that and has priority over or
i am also a newish c++ enjoyer so maybe it is true but i dont think so
i++ < l || (++j < m && k < n) is this technically how it is
you can put brackets around the and stuff
if that were the case, j would be 4 in the output. no?
its just left to right without priority
unless there are parenthesis
ok thanks
@sinful condor Has your question been resolved? If so, run !solved :)
!solved