Skip to content
Home » Even Number Program in C

Even Number Program in C

Learn about Even Number Program in C in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.


Even Number Program in C

Source code:

int main()
  int number;

  printf("Enter number: ");
  if(number%2 == 0)
  printf("%d is an even number \n", number);
  printf("%d is not an even number \n", number);
  return 0;


Enter number: 4
4 is an even number

Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.

Similar Codes :
Simple Calculator program in C
Check Leap Year Using a switch case statement