Main.cc: In function 'int main()': Main.cc:9:6: error: expected ';' before 'if' if((n%4==0 && n%100!=0) || n%400==0){ ^ Main.cc:12:6: error: 'else' without a previous 'if' else{ ^