#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&n);
if(n%2==0)
printf("\n%d is even number",n);
else
printf("\n%d is odd number",n);
}
#include<conio.h>
void main()
{
int n;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&n);
if(n%2==0)
printf("\n%d is even number",n);
else
printf("\n%d is odd number",n);
}
NOTE"= In "C" language "=="operator is used for comparison of two values.
No comments:
Post a Comment