Exercise 3: Even or Odd?
Check whether a number is even or odd.
We'll cover the following
Problem statement
Given an integer, determine if that number is even or not. If the number is even, return 0. Otherwise, return 1.
Example
num = 5
result = 1
num = 2
result = 0
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy