Accepted
/in/foo.c: In function 'main': /in/foo.c:7:20: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if (n % 4 == 0 && n % 100 != 0 || n % 400 == 0) ~~~~~~~~~~~^~~~~~~~~~~~~~~
代码
#include <stdio.h>
int main()
{
int n;
scanf("%d", &n);
if (n % 4 == 0 && n % 100 != 0 || n % 400 == 0)
printf("yes");
else
printf("no");
return 0;
}