Sunday, 9 October 2016

Program to check the number is Odd or Even.



#include<stdio.h>
#include<conio.h>
void main()
{
                 int a;
                 clrscr();

                             printf("Enter the number ");
                             scanf("%d",&a);
                 if (a%2!=0)
                             printf("%d is a Odd number");
                 else
                             printf("%d is a Even number");
                  getch();
}


OUTPUT

Enter the number
7
7  is a Odd number

No comments:

Post a Comment