getting the actual sum as we shifted the numbers by / 50 to avoid negative indexing in array
int temp = i - 50 * n ; max_value = Math . Max ( max_value , temp * ( sum - temp ) ) ; min_value = Math . Min ( min_value , temp * ( sum - temp ) ) ; } } Console . WriteLine ( " Maximum ▁ Value : ▁ " + max_value + " STRNEWLINE " + " Minimum ▁ Value : ▁ " + min_value + " STRNEWLINE " ) ; }