Program to check if a number is even or odd

 ap2f

#include<iostream>
using namespace std;

//Prpgram to check if a number is even or odd

int main(){

    int n;
    cin>>n;

    if(n%2==0){
        cout<<"Even"<<endl;
    }
    else{
        cout<<"Odd"<<endl;
    }
    return 0;
}

Comments