Menu BAR

FEEL FREE TO ASK ANY PROGRAM and please mention any error if you find it

14 Jan 2013

Find whether the number is EVEN OR ODD?

#include<stdio.h>

#include<conio.h>

void main( )                                       // returns no value

{

clrscr( ) ;

int num  ;

printf(" Enter the number ") ;

scanf("%d", &num) ;

if(num%2 = = 0)
   {
     printf(" NUMBER IS EVEN ") ;
    }
else
   {
    printf(" NUMBER IS ODD") ;
   }

getch( );

}

No comments:

Post a Comment