//program to check odd/even in C Language
#include<stdio.h>
#include<conio.h>
void main()
{
       int n
       clrscr();
       printf("\nEnter a number: ");
       scanf("%d",&n);
       if((n%2)!=0)
       {
              printf("\n%d is an odd number.",n);
       }
       else
       {
              printf("\n%d is an eveb number.",n);
        }
        getch();
}

Comments