Twelve short problems, each built around one comparison or one way of joining them. They go from single operators — equal, not equal, less than — to ranges and conditions with two parts.
Before you write a condition, say it out loud:
- "and" means
&&, "or" means||, "not" means!. - Between 10 and 20 is two tests:
n >= 10 && n <= 20. Never10 <= n <= 20. - Included means
>=or<=; strictly means>or<.
Then check it against one value that should pass and one that shouldn't — and one sitting exactly on the edge.