Finding The Given Year Is Leap or Not In C Program



#include <stdio.h>

int main()
{
    int n;
    printf("\nEnter the Year :");
    scanf("%d", &n);
    if(n%4==0)
    {
        printf("\nGiven year is leap");
    }
    else
    {
        printf("\nGiven year is not leap ");
    }
    return 0;
}

Comments