Max subarray sum-uisng cumltive sum

when i computed max subarray sum using cumlative subarray method then my output in incorrect

i have mark the error
check this