Maximum subarray sum(hb)

i dont know how to take an array as input.

https://ide.codingblocks.com/s/112930 - this is the url of the code

Hello @Ayushi21,
First input the number of testcases.
Then for each testcase, input the size of array.
Do cin>>arr[i]; for i =0 to i=n-1.
Remove “the maximum sum is” to match the output format.
Output maximumsum instead of current sum.

Change:
if(currentsum<maximumsum){
maximumsum+=currentsum;
}

to:
if(currentsum>maximumsum){
maximumsum=currentsum;
}

https://ide.codingblocks.com/s/116362 - hey i have corrected my mistakes but the output is not coming

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.