NOTE :
// indicates comments.This wont get printed in the output.This is used for for documentation purpose.
PROGRAM:
#include<stdlib.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("\nEnter a natural number\t:\t");
scanf("%d",&n);
if(n%2==0)
{
printf("\n%d is an Even NUMBER",n);
}
else
{
printf("\n%d is a ODD NUMBER",n);
}
getch();
}
OUTPUT :
// indicates comments.This wont get printed in the output.This is used for for documentation purpose.
PROGRAM:
#include<stdlib.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("\nEnter a natural number\t:\t");
scanf("%d",&n);
if(n%2==0)
{
printf("\n%d is an Even NUMBER",n);
}
else
{
printf("\n%d is a ODD NUMBER",n);
}
getch();
}
OUTPUT :


0 comments: