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

Program to check whether the entered number is even or odd using if else
//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();
 }
Program to check whether the entered number is even or odd using if else Program to check whether the entered number is even or odd using if else Reviewed by SHERE KHOJRAHA on February 13, 2019 Rating: 5

No comments:

Powered by Blogger.