/* check whether a given number is even or odd */
#include<stdio.h>
#include<conio.h>
int main()
{
int a;
printf("Enter number : \n");
scanf("%d",&a);
if
(a % 2 ==0)
printf("The given number is EVEN\n");
else
printf("The given number is ODD");
return0;
}
#include<stdio.h>
#include<conio.h>
int main()
{
int a;
printf("Enter number : \n");
scanf("%d",&a);
if
(a % 2 ==0)
printf("The given number is EVEN\n");
else
printf("The given number is ODD");
return0;
}
No comments:
Post a Comment