Java Programming Question on Exercise CheckOddEven (if-else): Write a program called CheckOddEven which prints "Odd Number" if the int variable “number” is odd, or “Even Number” otherwise.
Hints: n is an even number if (n % 2) is 0.
For the Solution for Solution for Exercise CheckOddEven
Hints: n is an even number if (n % 2) is 0.
public class CheckOddEven { // saved as "CheckOddEven.java" public static void main(String[] args) { int number = 49; // set the value of number here! System.out.println("The number is " + number); if ( ...... ) { System.out.println( ...... ); } else { System.out.println( ...... ); } } }
For the Solution for Solution for Exercise CheckOddEven
No Comment to " Exercise CheckOddEven (if-else) "