Accepted
foo.cc: In function 'int main()': foo.cc:6:11: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(y%4==0&&y%100!=0||y%400==0) ~~~~~~^~~~~~~~~~
正在同步测试数据,请稍后 自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。
代码
#include<iostream>
using namespace std;
int main()
{
int y;cin>>y;
if(y%4==0&&y%100!=0||y%400==0)
{
cout<<"yes"; return 0;
}
cout<<"no";
return 0;
}