LeapYear


Submit solution

Points: 20 (partial)
Time limit: 8.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
C

Write a C program to find whether a given year is a leap year or not. A leap year is exactly divisible by 4 except for century years (years ending with 00). The century year is a leap year only if it is perfectly divisible by 400.

Sample Inputs

2019

2020

Sample Outputs

noleap

leap


Comments


  • 0
    RAJA_KUMAR_1  commented on May 15, 2023, 8:32 p.m. edited

    .


  • 0
    cbenu4cys22016  commented on May 3, 2023, 9:14 p.m. edited

    .


  • 0
    Rakshith  commented on June 27, 2022, 6:18 p.m.

    include<stdio.h>

    int main() { int a; scanf("%d",&a); if(a%400==0) printf("leap"); else if(a%100==0) printf("noleap"); else if(a%4==0) printf("leap"); else printf("noleap"); }