Sunday, July 31, 2016

EVEN OR ODD- C Language

/*EVEN OR ODD*/

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int a;
clrscr();
printf("Enter the number::\n");
scanf("%d",&a);
if(a%2 == 0)
{
printf("Number is ev
en");
}
else
{
printf("Number is odd");
}
getch();
}


/************************OUTPUT***************************
Enter the number::6
Number is even*/

No comments:

Post a Comment