Write a C++ function (call it index_max) that finds the maximum number in a 1-Darray of floats, that is passed to the function, and returns the max number and itsindex. For example, if you pass [5.1, 6, 8.5, 9, 5.6, 2.7] to the function, you obtain9 and 3. Write a C++ program and test your function. Take the following note intoconsideration when writing your program:• The function should prevent changing the elements of the passed array.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here