Check Even or Odd
Easyjavapythonccpp
Learn the Concept: Introduction to JavaRead a single integer n from standard input. Print Even if it is even, otherwise print Odd.
Example 1
Input
4
Output
Even
Example 2
Input
7
Output
Odd
- -1000000000 <= n <= 1000000000
Hint 1
n % 2 == 0 means even.
Hint 2
Negative numbers can be even too.
Take n modulo 2; print "Even" when the remainder is 0, else "Odd".
Submit an attempt to unlock the solution. (Sign in first.)
Related Problems
- Print Hello WorldEasy · java, python, c, cppSolve Problem
- Add Two NumbersEasy · java, python, c, cppSolve Problem
- Hello in Two LinesEasy · javaSolve Problem