C Program to Check Whether the Entered Number is Even or Odd

C Program to Check Whether the Entered Number is Even or Odd, Write a program to check whether the entered number is even or odd.

Write a program to check whether the entered number is even or odd.

C Code


#include <stdio.h>
#include <conio.h>
void main()
{
  int number;

  printf("enter number : \n");
  scanf("%d",&number);

  if(number%2==0)
    printf("%d is even number\n",number);
  else
    printf("%d is odd number\n", number);

    getch();
}

Output

even or odd number

You May Also Like...

Socialize with Us