minPositive and maxNegative will store smallest positive and smallest negative integer respectively .
int sum = 0 , minPositive = int . MaxValue , maxNegative = int . MinValue ; for ( int i = 0 ; i < n ; i ++ ) {