Description:
Check whether a number is even or odd.
Check whether a number is even or odd.
Java Code
public class EvenOdd {
public static void main(String[] args) {
int num = 17;
if (num % 2 == 0)
System.out.println(num + " is Even");
else
System.out.println(num + " is Odd");
}
}
Expected Output
17 is Odd