Kawsar_Hossain

problem_1

May 25th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.   int y;
  5.   scanf("%d", &y);
  6.   if (y%400 == 0)
  7.     printf("This is a leap year\n");
  8.   else if (y%100 == 0)
  9.     printf("This isn't a leap year\n");
  10.   else if (y%4 == 0)
  11.     printf("This is a leap year\n");
  12.   else
  13.     printf("This isn't a leap year\n");
  14.   return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment