Exercise 1: Even or Odd

Check whether the number is even or odd.

Problem statement

Write a code that will check whether a given integer number is even or odd. Think along the lines of using the if-else condition.

Sample input

Create a free account to access the full course.

Continue your learning journey with a 14-day free trial.

By signing up, you agree to Educative's Terms of Service and Privacy Policy