Max value of array

it is showing error at the 3rd test case …how do i figure it out as its not showing the input taken

May be you can try to use cout statement after taking input.

You have taken the absolute value, you are making -ve numbers +ve which is not the case.

1 Like