Even or Odd

Lab C++ Beginner 10 points

Read an integer and print even or odd.

Input

One integer.

Output

One word.

Example

Input

4

Output

even
Sample input available Sample output available
Editor
C++

Hints

n % 2 is -1 for negative odd numbers, so compare with 0.

Solution explanation

The condition goes in parentheses; the branches in braces.

Show solution
#include <iostream>
using namespace std;

int main() {
    int n;
    cin >> n;
    if (n % 2 == 0) {
        cout << "even\n";
    } else {
        cout << "odd\n";
    }
    return 0;
}
Output
Answer
HOME LEARN COMMUNITY DASHBOARD