/* 2 program of even and odd */
#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("Enter a number :");
scanf("%d",&n);
if((n&1)==1)
printf("odd number");
else
printf("even number");
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("Enter a number :");
scanf("%d",&n);
if((n&1)==1)
printf("odd number");
else
printf("even number");
getch();
}
No comments:
Post a Comment