Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- char a[10000];
- int d=0;
- while(gets(a))
- {
- int i=0,j=0,k=0,l=0,n=0,p=0,s=0,flag=0;
- int q=0,w=0;
- l=strlen(a)-1;
- for(s=0;s<=l;s++)
- {
- i=(i*10+a[s]-'0')%400;
- j=(j*10+a[s]-'0')%100;
- k=(k*10+a[s]-'0')%4;
- n=(n*10+a[s]-'0')%15;
- p=(p*10+a[s]-'0')%55;
- }
- if(d!=0)
- printf("\n");
- d=1;
- if(i==0)
- {
- printf("This is leap year.\n");
- q=1;
- flag=1;
- }
- else if(j==0);
- else if(k==0)
- {
- printf("This is leap year.\n");
- q=1;
- flag=1;
- }
- if(n==0)
- {
- printf("This is huluculu festival year.\n");
- w=1;
- flag=1;
- }
- if(q==1&&p==0)
- {
- printf("This is bulukulu festival year.\n");
- flag=1;
- }
- if(flag==0)
- printf("This is an ordinary year.\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement