Write a C Program find whether the given year is leap year or not. - Pratik Ghelani

Pratik Ghelani

Breaking

Thursday, January 10, 2019

Write a C Program find whether the given year is leap year or not.

Program:-

#include <stdio.h>
void main()
{
    int y;
    printf("Enter year : ");
    scanf("%d", &y);
    if(y%4==0)
    {
        printf("This is leap year ");
    }
    else
    {
        printf("This is not leap year");
    }


}

OutPut:-




No comments:

Post a Comment