Main.cc: In function 'int main()': Main.cc:5:5: error: expected initializer before 'cin' cin>>n; ^ Main.cc:6:20: error: 'n' was not declared in this scope for(int i=1;i<=n;i++){ ^