Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.71 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4. int main ()
  5. {
  6.     char st[10000];
  7.     int i, x, f, c;
  8.     long long m=0;
  9.     while(scanf(" %[^\n]",st)!= EOF){
  10.         x=strlen(st);
  11.         for(i=0;i<x;i++){
  12.             m=(m*10)+(st[i]-'0');
  13.         }
  14.         f=0, c=0;
  15.         if(m%400==0||m%4==0&&m%100!=0){
  16.             printf("This is leap year.\n");
  17.             f=1, c=1;
  18.         }
  19.         if(m%15==0){
  20.             printf("This is huluculu festival year.\n");
  21.             c=1;
  22.         }
  23.         if(m%55==0&&f==1){
  24.             printf("This is buluculu festival year.\n");
  25.             c=1;
  26.         }
  27.         if(c==0) printf("This is an ordinary year.\n");
  28.         printf("\n");
  29.     }
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement