huh?
查看原帖
huh?
977778
__Harry_Haiyun__楼主2023/5/16 17:42
#include <iostream>
using namespace std;
int main()
{
	int Y;
	cin >> Y;
	if (Y % 4 == 0 && Y % 100 != 0 || Y % 400 == 0)	cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

/*
/Main.cpp: In function ‘int main()’:
./Main.cpp:8:17: warning: suggest parentheses around ‘&amp;&amp;’ within ‘||’ [-Wparentheses]
    8 |  if (Y % 4 == 0 &amp;&amp; Y % 100 != 0 || Y % 400 == 0) cout &lt;&lt; &#34;Yes&#34; &lt;&lt; endl;
      |      ~~~~~~~~~~~^~~~~~~~~~~~~~~
      */
2023/5/16 17:42
加载中...