C++ Program to Check Leap Year

Here is C++ program to check whether a year is a leap year or not.

A leap year consists of 366 days instead of 365 days. In a leap year, February month consists of 29 days.

Output:

Enter Year(ex:1900):2000
Leap Year

3 thoughts on “C++ Program to Check Leap Year”

  1. #include
    main()
    {
    int a;
    printf(“Enter a year”);
    scanf(“%d”,&a);
    if(a%4==0)
    printf(“Year is a leap year”);
    else
    printf(“Year is not a leap year”);
    }

Leave a Comment

Your email address will not be published.