Main.cc: In function 'int main()':
Main.cc:5:2: error: expected ',' or ';' before 'int'
int n;
^
Main.cc:6:7: error: 'n' was not declared in this scope
cin>>n;
^
Main.cc:7:6: error: redeclaration of 'int sum'
int sum=0;
^
Main.cc:4:7: note: 'int sum' previously declared here
int sum=(0)
^