Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int y;
- printf("enter a year");
- scanf("%d",&y);
- if(y%400==0)
- {
- printf("%d is a leap year",y);
- }
- else if (y%100!=0&& y%4==0)
- {
- printf("%d is a leap year",y);
- }
- else
- {
- printf("%d is not a leap year",y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement