Abdullah_A_lAsif_001

check leap year or not 1

May 25th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int n;
  5.     printf("ENTER THE ANY YEAR :");
  6.     scanf("%d",&n);
  7.     if(n%4==0 || n%400==0)
  8.     {
  9.         if(n%100==0)
  10.         {
  11.             printf("%d is not leap year\n",n);
  12.         }
  13.         else
  14.             printf("%d is leap year\n",n);
  15.  
  16.     }
  17.     else
  18.     {
  19.         printf("%d is not leap year\n",n);
  20.  
  21.     }
  22.     return 0;
  23. }
Add Comment
Please, Sign In to add comment