C Program Check Given Number Is Even Or Odd :
//C Program Check Given Number Is Even Or Odd
#include<stdio.h>
#include<conio.h>
void main()
{
int num;
clrscr();
printf("\n Enter a value:= ");
scanf("%d",&num);
if(num%2==0)
printf("\n Entering number is even");
else
printf("\n Entering number is odd");
printf("\n\n//** Press any key to exit **\\");
getch();
}
OUTPUT#include<stdio.h>
#include<conio.h>
void main()
{
int num;
clrscr();
printf("\n Enter a value:= ");
scanf("%d",&num);
if(num%2==0)
printf("\n Entering number is even");
else
printf("\n Entering number is odd");
printf("\n\n//** Press any key to exit **\\");
getch();
}
No comments:
Post a Comment