Showing Runtime error

Showing Runtime error workin on compile and test

Save your code on ide.codingblocks.com and share its link.

Check now.
Also, this question you must solve using the Kadane’s algorithm.

compilation is successful and getting desired output

https://ide.codingblocks.com/s/268386 with kadenes algo

Check the above code, i have commented out your mistakes there.

where cannot see your comments

thanks pratyush kumar

still getting run time error even with corrected version

https://ide.codingblocks.com/s/268396 Check by submitting this.

This is the improved version. You do not need to make an extra array for cumulative sum in Kadane algorithm

the problem was declaring a[1000] in my code

thanks pratyush bhai