Thursday, 11 July 2013

Write a Program which will print the Odd / Even Numbers.

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int n;
printf("\n\nEnter the value of n : ");
scanf("%d",&n);
if(n%2==0)
printf("\nThis is an even number.");
else
printf("\nThis is an odd number.");
getch();
}

No comments:

Post a Comment