Social Icons

Saturday, 8 February 2014

Program to check whether a given number is even or odd

#include<stdio.h>
#include<conio.h>

void main()
{
int n;
clrscr();
printf("\n Enter any number:");
scanf("%d",&n);

if(n%2==0)
printf(" The number is even");
else
printf(" The number is odd");

getch();
}



                                               Output

No comments:

Post a Comment