I have a problem with logic.
If the number is higher than 0 and less than 10 AND the number is 11 AND the number is 22 do something. (1, 2, 3, 4, 5, 6, 7, 8, 9, 11 or 22).
And ELSE IF the number is higher than 10 BUT is NOT 11 or is NOT 22, do something else. (10, 12, 13 ….20, 21, 23, 24…)
I got to do only with 11, but I have no clue how to insert another condition with 22.
if (n >= 0 && n < 10) || (n == 11 && n == 22) {
do something
} else if (n >= 10 && n != 11) && (n != 22) {
do something else
}
Please, don’t downvote. English is not my first language.