Skip to content

Instantly share code, notes, and snippets.

@somratcste
Created February 6, 2014 07:30
Show Gist options
  • Save somratcste/8839738 to your computer and use it in GitHub Desktop.
Save somratcste/8839738 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int i=0,k=0,n,j=0;
while(cin>>n)
{
if(n<2000)
break;
if(n%4==0 && n%100 != 0 || n%400==0)
{
cout<<"This is leap year.\n";
i=1;
}
if(n%15==0)
{
cout<<"This is huluculu festival year.\n";
j=1;
}
if(n%55==0 && i==1)
{
cout<<"This is bulukulu festival year.\n";
k=1;
}
if(j==0 && k==0 && i==0)
{
cout<<"This is an ordinary year.\n";
}
i=j=k=0;
cout<<"\n";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment