Friday, July 24, 2020

Write a Program find Odd or Even number in C.

Even or odd program in C


#include <stdio.h>


int main()

{

  int x;

  printf("Enter The Number :\n");

  scanf("%d", &x);

 

  if (x%2 == 0)


    printf("It is Even Number :>\n");


  else


    printf("It is Odd Number :>\n");

 

  return 0;

}

 

 

 

OUTPUT

 

Enter The Number :

55

It is Odd Number :>

 

...........................................

 

Enter The Number :

50

It is Even Number :>

 

No comments:

Post a Comment

Please do not any spam link in Comment Box