Advertisement
Fahim_789

leap year or Not

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