Uva 10070 – Leap Year or Not Leap Year and …

Problem Link

Solution :-

Java code:

 

C code:

 

Posted by Shipu Ahamed

2 comments

Why this code not ACCEPTED ………..?What’s wrong with it???

#include<stdio.h>
int main()
{
int n;
while(scanf(“%d”,&n)!=EOF){
if(n%4==0||n%100==0||n%400==0){
printf(“This is leap year.\n”);
if(n%15==0)
printf(“This is huluculu festival year.\n”);
if(n%55==0)
printf(“This is bulkulu festival year.\n”);}

else{
if(n%15==0)
printf(“This is huluculu festival year.\n”);
else
printf(“This is an ordinary year.\n”);}}
return 0;
}

Find yourself…

Leave a Reply