C Program to check if number is even or odd

Program:
#include<stdio.h>
int main()
 
{
    int m;
    printf("Enter any number:");
    scanf("%d",&m);
    
    if(m%2==0)
        printf("\nThe given number is even :");
    else
        printf("\nThe given number is odd :");
 
    return 0;        
}

Output:

Previous Post Next Post