/in/foo.cc: In function 'int rn(int)':
/in/foo.cc:12:17: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
12 | if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0) return 1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:37:22: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
37 | while (sum >= 365 && rn(yr + 1) == 0 || sum >= 366 && rn(yr + 1) == 1) {
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/foo.cc:88:45: error: expected '}' at end of input
88 | printf("%.4d-%.2d-%.2d\n", yr, mo_x, dy_x);
| ^
/in/foo.cc:18:31: note: to match this '{'
18 | for (int i = 1; i <= n; i++) {
| ^
/in/foo.cc:88:45: error: expected '}' at end of input
88 | printf("%.4d-%.2d-%.2d\n", yr, mo_x, dy_x);
| ^
/in/foo.cc:15:12: note: to match this '{'
15 | int main() {
| ^