TOPIC

i got 15% worng answer.where is the fault ?

trahman82 asked 4 years ago

include<bits/stdc++.h>

using namespace std; int main() { unsigned long long int y; while(scanf("%llu",&y)!=EOF) { if(y<2000) { cout << " \n"; } else if(y%15==0 && y%55==0) { if((y%4==0 && y%100!=0)||(y%400==0)) { cout << ("This is leap year\n"); cout <<("This is huluculu festival year\n"); cout <<("This is bulukulu festival year\n"); } else cout <<("This is huluculu festival year\n"); cout <<("This is bulukulu festival year\n"); } else if(y%15==0) { if((y%4==0 && y%100!=0)||(y%400==0)) { cout <<("This is leap year\n"); cout <<("This is huluculu festival year\n"); } else cout <<("This is huluculu festival year\n"); } else if(y%55==0) { if((y%4==0 && y%100!=0)||(y%400==0)) { cout <<("This is leap year\n"); cout <<("This is bulukulu festival year\n"); } else cout <<("This is bulukulu festival year\n"); } else if((y%4==0 && y%100!=0)||(y%400==0)) { cout <<("This is leap year\n"); } else { cout <<("This is an ordinary year\n"); } } return 0; }

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.