Program to find whether a number is Even or Odd
#include<stdio.h>
void main()
{
int num;
printf("\nEnter the number:");
scanf("%d",&num);
if(num%2==0)
printf("Number %d is Even.",num);
else
printf("Number %d is Odd.",num);
}
void main()
{
int num;
printf("\nEnter the number:");
scanf("%d",&num);
if(num%2==0)
printf("Number %d is Even.",num);
else
printf("Number %d is Odd.",num);
}
Comments
Post a Comment