Main.cc: In function 'int main()':
Main.cc:10:18: error: expected ';' before '<=' token
for(int i=3,i<=n;i++){
^
Main.cc:10:18: error: expected primary-expression before '<=' token
Main.cc:11:24: error: 'q' was not declared in this scope
long long a[i]=q*a[i-1];
^
Main.cc:14:9: error: 'sum' was not declared in this scope
sum+=a[i];
^
Main.cc:16:11: error: 'sum' was not declared in this scope
cout<