0_0_24239040_27502.cpp: In function 'int main()': 0_0_24239040_27502.cpp:62:63: error: 'i' was not declared in this scope for(int i=1;i<n;i++) printf("%d ",ans[i]);printf("%d\n",ans[i]); ^