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