Thursday, 19 July 2018

Even or Odd?

===========================================================================
                                CODING



#include<iostream.h>
#include<conio.h>
#include<math.h>

void main()
{
clrscr();
int a,b;
cout<<"\n Enter any integer: ";
cin>>a;
b=a%2;
if(b==0)
{
cout<<"\n The no. is an even no.";}
else
{
cout<<"\n The no. is an odd no.";}
getch();
}

===========================================================================


                                OUTPUT


No comments:

Post a Comment