You cannot put together a statement like this. You need &&him.
For example,
if ((N % 2 == 0) && (6 <= N && N <= 20)) {...}
The reason you get the error is the first condition 6 <= Nthat resolves boolean, and then you try to check if there is boolean <=for int. This is not calculated.
source
share