Hello my fellow coding warriors
Does any of you guys make sense of question 28 of assignment one. According to my knowledge the relational operators >=, < will be executed first then the
logical operator
&& is executed before logical
| | operator. If I were to rewrite that
crit bool variable:
bool crit = (age >= 200 || popul < 10000 &&
age > 100);
rewrittten:
Language: C++
bool crit = (((popul < 10000) && (age > 100)) ||(age >= 200))
The rewritten crit variable is the same as as the original one, i just ordered it. Then the answer would be no. 5. i.e. the while loop can only be executed if popul < 1000 and age > 100
OR age > 200.
As I am writing this I see option 2 might be the answer as well...I need a second opinion
Perhaps I am confusing the logic

....anyone seeing things differently and clearly than me?
Thank you in advance.
C-go