0_0_14102509_15140.cpp: In function 'int main()': 0_0_14102509_15140.cpp:29:13: error: 'n' was not declared in this scope sum=n*(n+1)*(n+2)/6; ^