0_0_30210057_19947.cpp: In function 'int main()': 0_0_30210057_19947.cpp:7:14: error: 'n' was not declared in this scope cout<<n*n*n*(n*n*n-1)/2-3*n*n*(n-1)<<endl; } ^