===========================================================================
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();
}
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();
}
===========================================================================
No comments:
Post a Comment