Write a function to find whether the given input number is Even.
f the given number is even, the function should return 2 else it should return
Answers
Answered by
0
Answer: If a number is evenly divisible by 2 with no remainder, then it is even. You can calculate the remainder with the modulo operator % like this num % 2 == 0 . If a number divided by 2 leaves a remainder of 1, then the number is odd.
Explanation:
Answered by
0
It is even if an integer is evenly divided by two with no residual. The remainder can be calculated with the modulo operator
You can calculate the remainder with the modulo operator % like this num % 2 == 0 .
A number is odd if it divides by two and leaves a leftover of one.
#SPJ3
Similar questions