Advertisement
Mahmud33

leap year or not

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