The input is an array of (at least 3, maximum 20) different integers. Each integer is greater than -1000 and smaller than 1000.
Your task is to shrink the numbers by "linearly mapping" them from
1.0. This means the smallest number in the array will be mapped to 0.0, the largest to 1.0.
You get the array as a parameter (inside a function) or stdin/program arguments (you can choose). Print out the result in the format
double1;double2;double3;.... The output has to have the same order as the input.
If you want, you can round the output to 2 digits after the decimal point. There must be atleast 1 digit after the decimal point.
The usage of built-in functions (functions which scale down the numbers for you, such as mathematicas
Rescale) is disallowed.
Input Output [5,-20,30] 0.5;0.0;1.0 [1,2,3,4,5] 0.0;0.25;0.5;0.75;1.0 [0,5,100,400] 0.0;0.01;0.25;1.0
(The last output is rounded, otherwise it would be