Any integer is input through the keyboard. Write a program to find out whether it is an odd number or even number.

 


/*Program to find number is odd or even

  Author:Priyanshu, Date: November20,2020*/


#include<stdio.h>

#include<conio.h>


main()

  {

     int num;

     clrscr();

     printf("Enter the number:");

     scanf("%d",&num);

     if(num%2==0)

       {

  printf("Number is even");

       }

     else

       {

  printf("Number is odd");

       }

     getch();

     return(0);

  }

Comments