C++ function to iteratively find the position of the minimum absolute value within an array

  absolute-value, arrays, c++, loops

I need a C++ function to iteratively find the position of the minimum absolute value within an array.

Example:

input = [2, 7, -3, 5, 9, 1, 3]

Expected output:

5

(1 is minimum Absolute value)

Source: Windows Questions C++

LEAVE A COMMENT