Update the maximum and minimum accordingly
minimum = Math . Min ( minimum , arr [ i ] ) ; maximum = Math . Max ( maximum , arr [ i ] ) ; } } Console . Write ( minimum + " , ▁ " + maximum + " STRNEWLINE " ) ; }