The program has the following output:
2 3 4 5 6 -3 -2 -1 0 1 2 3 4 5 6
minimum: -3
maximum: 6
min: -3
max: 6
distance: 9
minimum of absolute values: 0
maximum of absolute values: 6
Note that the algorithms return the position of the maximum or minimum element, respectively.
Thus, you must use the unary operator * to print their values