Find number is odd or even
- TO FIND ODD OR EVEN FROM GIVEN NUMBER
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter the number:");
scanf("%d",&a);
if(a%2==0)
{
printf("\n Number is even");
}
else
{
printf("\n Number is Odd");
}
getch();
}
Output:
Enter the number:5
Number is Odd

0 comments: