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 show present time and date in C-language

Introduction of C-language.

Program to cheque enter number is a perfect number or not using if else in C-language

Program to cheque four digits number is palindrome or not in C-language

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

Simple Hello world program in c- language