Chapter:

C-programs-on-various-integers

C Program to check Leap Year:

This program checks whether the input year is leap year or not.

You can check whether a year is leap or not by using this mathematical logic:

Leap Year:

  • If a year is divisible by 4, 100 and 400 then it is a leap year.

  • If a year is divisible by 4 but not divisible by 100 then it is a leap year

Not a Leap Year:

  1. If a year is not divisible by 4 then it is not a leap year

  2. If a year is divisible by 4 and 100 but not divisible by 400 then it is not a leap year

Source Code:

#include <stdio.h>

int main()

{

    int y;


    printf("Enter year: ");

    scanf("%d",&y);


 &n....

Show More

All Chapters

View all Chapter and number of question available From each chapter from C-programming-