Even or Odd

Write a program to accept a numbers & display the number is even or odd.
--->

#include<stdio.h>
#include<conio.h>
void main()
{
int a;
printf("Enter the no.");
scanf("%d",&a);
if(a%2==0)
printf("%d is Even.");
else
printf("%d is Odd.");
getch();
}

0 comments: