Main.cc: In function ‘int main()’:
Main.cc:6:41: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
if((n%100==0&&n%400==0)||(n%100!=0&&n&4==0)){
~^~~
Main.cc:8:2: error: expected ‘}’ before ‘else’
else{
^~~~