Showing posts with label odd and even number. Show all posts
Showing posts with label odd and even number. Show all posts

Saturday, March 29, 2014

C program to Find out Odd and Even numbers

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter a Number\n");
scanf("%d",&a);
b=a%2;
if (b==0)
{
printf("Number is odd");
}
else
{
printf("Number is even");
}
getch();
}