updating the minrange
if ( ( maxval - minval ) < minrange ) { minel = minval ; maxel = maxval ; minrange = maxel - minel ; } } Console . WriteLine ( " The ▁ smallest ▁ range ▁ is " + " [ { 0 } , ▁ { 1 } ] STRNEWLINE " , minel , maxel ) ; }