C++ Programs & Stuffz

Nothing like anything!!!

Please Click on ADS!!

Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!

Tuesday, August 31, 2010

Check whether the entered number is odd or even

//pgm to check whether the entered number is odd or even
#include<iostream.h>
#include<conio.h>
void main()
{
    int n;
    clrscr();
    cout<<"enter the number";
    cin>>n;
    if(n%2==0)
        cout<<n<<"is an even number";
    else
        cout<<n<<"is a odd number";
    getch();
}

0 comments:

Post a Comment

free counters