Advertisement
MOHD_NASIR_UDDIN42

01-Leap Year-code marshal.

May 21st, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int year;
  5.     scanf("%d",&year);
  6.     if(year%400==0)
  7.     {
  8.         printf("YES\n");
  9.     }
  10.     else if(year%100==0)
  11.     {
  12.         printf("NO\n");
  13.     }
  14.     else if(year%4==0)
  15.     {
  16.         printf("YES\n");
  17.     }
  18.     else
  19.         printf("NO\n");
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement