$ g++ Kadane.cpp $ a.out Enter the array length: 5 Enter the array: 1 -5 2 -1 3 The Max Sum is: 4 Enter the array length: 9 Enter the array: -2 1 -3 4 -1 2 1 -5 4 The Max Sum is: 6 ------------------ (program exited with code: 0) Press return to continue