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\n");
- scanf("%d",&y);
- if(y%4==0 && y%100==0)
- {
- printf("%d is not a leap year\n",y);
- }
- else if(y%4==0)
- {
- printf("%d is a leap year\n",y);
- }
- else
- {
- printf("%d is not a leap year\n",y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement