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:8:31: warning: unused variable 'x' [-Wunused-variable]
long long a[51]={1,2,4},n,x=a[1]/a[0],sum=0;
^