Even/Odd Number Checking Code in CPP

Find The Digit ODD And EVEN via Cpp programming?


#include<iostream>
#include<conio.h>
using namespace std;

int main()
{
int y;
cout<<"Enter Num";cin>>y;
if(y%2==0)
cout<<"Even Num";
else
{
cout<<"Odd Num";
    }
getch ();
}

Output Result

By Entering Odd Digit





By Entering Even Digit


Comments

Popular posts from this blog

Highest Marks program in CPP Language

Calculating Name and Marks in Cpp

Multiplication program in CPP Language