Table of Contents

    Assignment: Determine if a Number is Even or Odd

    Assignment: Determine if a Number is Even or Odd

    Problem Statement:

    Write a Java program that determines if a given integer is even or odd. The program should:

    1. Take a single integer as input.
    2. Use an if-else statement to check whether the integer is even or odd.
    3. Print "The number is even." if the number is even and "The number is odd." if the number is odd.