Write an algorithm to check whether a given number is even or odd.

Algorithm to check if a number is even or odd:

  1. Start
  2. Input a number N
  3. If N mod 2 = 0 (i.e., N is divisible by 2 with no remainder), then
    • Print “The number is even.”
  4. Else
    • Print “The number is odd.”
  5. End

This algorithm first checks if the number is divisible by 2. If it is, the number is even; otherwise, it is odd.