Advertisement
ZinedinZidan

zidan5

Sep 29th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int y;
  6.     printf("Enter a numbers: ");
  7.     while(scanf("%d",&y)!=EOF)
  8.     if(y%400==0)
  9.     {
  10.         printf("%d is a Leap Year\n",y);
  11.     }
  12.     else if(y%100!=0&&y%4==0)
  13.     {
  14.         printf("%d is a Leap Year\n",y);
  15.     }
  16.     else
  17.     {
  18.         printf("%d is not a Leap Year\n",y);
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement