why it not working
Simple input prob
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.