compareCheck is comparing if the value stored in check is less than 75 using the relational operator<. It is also comparing if the value stored in check is greater than or equal to 8 using another relational operator >=.
Finally, if a number lies between 8 and 75 both comparisons should be true. For this, we use the logical operator && which only returns true if both its left and right operand are true. Here, check < 75 is the left operand and check >= 8 is the right operand.
The objective of this exercise was to learn how to use several different types of operators in the same expression.
Let’s wrap up the discussion with operator precedence in the next lesson.