(int[] inputArray)
| 5 | public class Problem5 { |
| 6 | |
| 7 | public static int getMax(int[] inputArray) { |
| 8 | int maxValue = inputArray[0]; |
| 9 | |
| 10 | for (int i = 1; i < inputArray.length; i++) { |
| 11 | if (inputArray[i] > maxValue) { |
| 12 | maxValue = inputArray[i]; |
| 13 | } |
| 14 | } |
| 15 | return maxValue; |
| 16 | } |
| 17 | |
| 18 | public static int getMin(int[] inputArray) { |
| 19 | int minValue = inputArray[0]; |