Kadane's algorithm

why does output always come out zero ??https://ide.codingblocks.com/s/35409

i got the answer i forget to cin n.

Yes you have to take input n also :joy: