Even or Odd Program in C
#include<stdio.h>
#include<conio.h>
void main()\
{
int n1,r;
printf("Type the Number to be checked\n");
scanf("%d",&n1);
r=n1%2;
if(r==0)
printf("The Number is Even");
else
printf("\n The Number is Odd");
getch();
}
#include<conio.h>
void main()\
{
int n1,r;
printf("Type the Number to be checked\n");
scanf("%d",&n1);
r=n1%2;
if(r==0)
printf("The Number is Even");
else
printf("\n The Number is Odd");
getch();
}
Comments
Post a Comment