Advertisement
Guest User

Leap year

a guest
May 25th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. unsigned long year;
  5. int c;
  6. while(scanf("%ld",&year)==1)
  7. {
  8. if(year>=2000)
  9. {
  10. c=0;
  11. if(year%4==0 || year%400==0 || year%55==0)
  12. {
  13. printf("This is leap year");
  14. c++;
  15. }
  16. if(year%15==0)
  17. {
  18. if(c==1)
  19. printf("\nThis is huluculu festival year");
  20. else
  21. printf("This is huluculu festival year");
  22. c++;
  23. }
  24. if(year%55==0)
  25. {
  26. if(c>0)
  27. printf("\nThis is buluculu festival year");
  28. else
  29. printf("This is buluculu festival year");
  30. c++;
  31. }
  32. if(c==0)
  33. printf("This is an ordinary year");
  34. printf("\n\n");
  35. }
  36. }
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement