A sample C program for finding out odd and even numbers (in turbo c):
#include<stdio.h>
#include<conio.h>
void main()
{
int no;
clrscr();
printf("\nEnter any number:");
scanf("%d",&no);
if(no%2==0)
printf("\nNumber is even");
else
printf("\nNumber is odd");
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int no;
clrscr();
printf("\nEnter any number:");
scanf("%d",&no);
if(no%2==0)
printf("\nNumber is even");
else
printf("\nNumber is odd");
getch();
}