TOPIC
Why I'm getting Wrong Answer(100%). What is wrong?
Sunjare asked 4 years ago
#include<iostream>
using namespace std;
int main(){
int year;
while(cin>>year){
bool leap = false;
if((year%4==0 && year%100!=0) || year%400==0){
leap = true;
}
bool huluculu = false;
if(year%15==0){
huluculu = true;
}
bool bulukulu = false;
if(year%55==0){
if(leap){
bulukulu = true;
}
}
if(leap){
cout<<"This is leap year."<<endl;
}
if(huluculu){
cout<<"This is huluculu festival year."<<endl;
}
if(bulukulu){
cout<<"This is bulukulu festival year."<<endl;
}
if(!leap && !huluculu && !bulukulu){
cout<<"This is an ordinary year."<<endl;
}
cout<<endl;
}
return 0;
}
>