To check if it is Leap Year with C

By : Milon
On : 11:35 PM
#include <stdio.h>
void main(void)
{
    int year;
    printf("Enter a year to check if it is Leap Year\n");
    scanf("%d",&year);
    if(year%400==0) /* Why  mod 400 */
        printf("%d is a Leap Year\n",year);
    else if(year%100==0) /*  Why  mod 100  */
        printf("%d is not a Leap Year\n",year);
    else if(year%4==0)
        printf("%d is a Leap Year\n",year);
    else
        printf("%d is not a Leap Year\n",year);

}