0_0_17057066_13108.cpp: In function 'int main()': 0_0_17057066_13108.cpp:42:10: error: redeclaration of 'int i' int i; ^ 0_0_17057066_13108.cpp:30:10: note: 'int i' previously declared here for(int i=1;i<=n;i++){ ^