Program to check whether the number is even or odd
Program to check whether the number is even or odd.
#include
#include
void main()
{
int n;
clrscr();
printf("Enter number: );
scanf("%d",&n);
if(n%2==0)
printf("Number is even");
else
printf("Number is odd");
getch();
}
No comments:
Post a Comment
Thank you