Programs that make your work easy
All c and C++ programs on all topics are here.
Friday, 16 September 2016
To check whether the no is even or odd
#include < iostream.h >
void main()
{
int n;
cout<<"Enter an integer\n";
cin>>n;
if ( n%2 == 0 )
cout<<"Even\n";
else
cout<<"Odd\n";
Getch ();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment