I can use &&, !, ==, ||.
The language is Java, say I have an int i, i being an integer, I must give characteristics of it such that I get even? odd? positive? zero? negative?
The last 3 are obvious to me, but the others I can't seem to get in code. In English, fine, but using operators, I'm lost.
For example, if I'm giving the characteristic for a negative number, then: i < 0; for positive: i > 0; for zero: i == 0
Then prompting a user to input an integer, 7, for example, then:
even? false; odd? true; positive? true; zero? false; negative? false