Program to find even or odd in c
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter the number : ");
scanf("%d",&a);
if(a%2==0)
printf("The number is even.");
else
printf("The number is odd.");
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter the number : ");
scanf("%d",&a);
if(a%2==0)
printf("The number is even.");
else
printf("The number is odd.");
getch();
}
No comments:
Post a Comment