//WAP TO CHECK WHETHER THE GIVEN NO.IS EVEN OR ODD
#include
#include
void main()
{
int a;
clrscr();
printf("ENTER THE NUMBER=");
scanf("%d",&a);
if(a%2==0)
printf("\nNUMBER ENTERED IS A EVEN NUMBER");
else
printf("NUMBER ENTERED IS A ODD NUMBER");
getch();
}
/******OUTPUT******
ENTER THE NUMBER=2
NUMBER ENTERED IS A EVEN NUMBER
*/
No comments:
Post a Comment