0_0_22987105_13942.cpp: In function 'int main()': 0_0_22987105_13942.cpp:6:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++)sum+=i; ^