FINDING ODD OR EVEN
CODING:
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter the number");
scanf("%d",&a);
if(a%2==0)
{
printf("\n The Number is Even");
}
else
{
printf("\n The Number is Odd");
}
getch();
}
CODING:
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter the number");
scanf("%d",&a);
if(a%2==0)
{
printf("\n The Number is Even");
}
else
{
printf("\n The Number is Odd");
}
getch();
}
No comments:
Post a Comment