DESCRIPTION-:THIS PROGRAM CHECKS WHETHER THE GIVEN NUMBER IS
EVEN OR ODD
PROGRAM-:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n;
cout<<"enter any number";
cin>>n;
if(n%2==0)
{
cout<<"number is even";
}
else
{
cout<<"number is odd";
}
getch();
}
EVEN OR ODD
PROGRAM-:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n;
cout<<"enter any number";
cin>>n;
if(n%2==0)
{
cout<<"number is even";
}
else
{
cout<<"number is odd";
}
getch();
}
0 comments:
Post a Comment