Friday, August 19, 2011

Program to check whether the given number is Even or Odd.

//Program to check whether the given number is Even or Odd.
#include<stdio.h>
#include<conio.h>
void main()
{
 int n;
 clrscr();
 printf("\n enter the value of n");
 scanf("%d",&n);
 if((n%2)==0)
 {
   printf("\n number is even");
 }
 else
 {
   printf("\n number is odd");
 }
 getch();
}

Previous Next Home
0 Comments
Comments

Leave a Comment

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Twitter Delicious Facebook Favorites More