29. Round Away From Zero

Easy

Round each element of the float array Z away from zero (e.g. 2.3 → 3, -2.3 → -3, 0.5 → 1, -0.5 → -1).

Input

[-2.3  2.3 -0.5  0.5  3.  -7.1]

Output

[-3.  3. -1.  1.  3. -8.]

Sign in to write and run your own code.

Implement solve(...)