C language program even or odd
Here is complete program to check number is even or odd in c
If any doubt please ask in comment
#include<stdio.h>
void main()
{
int n;
clrscr() ;
printf("enter the value of n \n") ;
scanf(%d", & n) ;
if(n%2==0)
{
printf("even") ;
}
else
printf("odd") ;
getch() ;
}
void main()
{
int n;
clrscr() ;
printf("enter the value of n \n") ;
scanf(%d", & n) ;
if(n%2==0)
{
printf("even") ;
}
else
printf("odd") ;
getch() ;
}
If any doubt please ask in comment
good keep providing program
ReplyDelete