Main.cc: In function ‘int main()’: Main.cc:12:2: error: expected ‘;’ before ‘}’ token } ^ Main.cc:5:8: warning: unused variable ‘sum’ [-Wunused-variable] int m,sum=0,k=0; ^~~