write a java programme to find a given number is even or odd
Answers
Answered by
1
The entered number is then stored in a variable num . Now, to check whether num is even or odd, we calculate its remainder using % operator and check if it is divisible by 2 or not. For this, we use if...else statement in Java. If num is divisible by 2 , we print num is even
Similar questions