Program to to cheque give year is leap year or not in c-language

#include<stdio.h>
int main()
{
    int y;
    printf("Enter the year\n");
    scanf("%d",&y);
    if(y%4==0&&y%100!=0||y%400==0)
    {
        printf("Enter year is leap year");
    }
    else
    {
        printf("Enter year is not leap year ");
    }
    }

OUTPUT
Enter the year
2016
Enter year is leap year

Comments

Popular posts

Creative pattern of butterfly in C-language

Program to cheque enter number is even or odd in c-language

Program to print the cube of a number in c-language

Creative Pattern of Rhino in C-language

Variable & Datatype for C-programming

Division of two numbers in C-language