foo.cc: In function ‘int main()’:
foo.cc:7:14: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    7 |     if(n%4==0&&n%100!=0||n%400==0)
      |        ~~~~~~^~~~~~~~~~
foo.cc:7:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    7 |     if(n%4==0&&n%100!=0||n%400==0)
      |     ^~
foo.cc:9:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
    9 |         if(m%4==0&&m%100!=0||m%400==0)
      |         ^~
foo.cc:9:18: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    9 |         if(m%4==0&&m%100!=0||m%400==0)
      |            ~~~~~~^~~~~~~~~~