C Program to Check Whether a Number is Even or Odd

#include <stdio.h>
int main()
{
    int n;

    printf("Enter an integer: ");
    scanf("%d", &n);

    // Number will be even if the number is perfectly divisible by 2
    if(number % 2 == )
        printf("%d is even number.",n);
    else
        printf("%d is odd Number.",n);

    return ;
}
Check Related  Top 10 Websites for Practice Programming

Leave a Comment

Your email address will not be published. Required fields are marked *