Main.cc: In function 'int main()': Main.cc:6:4: error: expected ',' or ';' before 'while' while(cin>>n){ ^ Main.cc:4:8: warning: unused variable 'n' [-Wunused-variable] int n; ^ Main.cc:5:8: warning: unused variable 'sum' [-Wunused-variable] int sum=0 ^ Main.cc:19:1: error: expected '}' at end of input } ^