For Beginner
Wednesday, February 11, 2015
C Program to check whether a number is odd or even
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a;
cout<<"enter the number:";
cin>>a;
if(a%2==0)
cout<<"
Even number";
else
cout<<"
Odd number";
getch();
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.