Program to check whether the entered number is even or odd using if else

Tuesday, August 11, 2020

//Program to check whether the entered number is even or odd using if else

#include<iostream.h>

#include<conio.h>

 void main()

 {clrscr();

 int n;

 cout<<"\n Enter an Integer:";

 cin>>n;

 if(n%2==0)

 {

 cout<<n<<" Is Even ";

 }

 else

 {

 cout<<n<<" Is Odd";

 }

 getch();

 }

You Might Also Like

0 Comments

Like us on Facebook

Flickr Images

Flickr Short Films