Simple input prob


why it not working

https://ide.codingblocks.com/s/102467 check this allso

compilation error it shows

Hi Dhruv,
Two Compilation errors are:
1.You are initialising int outsum as a local variable inside for loop and treating it as global variable at line 12. Hence Compiler is unable to locate outputsum.
2. Again you are initialising int x as a local variable inside the same for loop.
Your logic is also very wrong.
And Please understand the Problem Statement clearly.