
Leap year or not leap year
By: a guest on Jan 28th, 2012 | syntax:
None | size: 0.52 KB | hits: 15 | expires: Never
#include<stdio.h>
int main()
{
int c, l;
long long int year;
while (scanf("%lld",&year)==1)
{
l = 0;
c = 1;
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
{
printf("This is leap year.\n");
c = 0;
l = 1;
}
if (year % 15 == 0)
{
printf("This is huluculu festival year.\n");
c = 0;
}
if (year % 55 == 0 && l)
{
printf("This is bulukulu festival year.\n");
c = 0;
}
if (c)
printf("This is an ordinary year.\n");
printf("\n");
}
return 0;
}