Write a C++ function (call it index_max) that finds the maximum number in a 1-D array of floats, that is passed to the function, and returns the max number and its index. For example, if you pass...


Write a C++ function (call it index_max) that finds the maximum number in a 1-D
array of floats, that is passed to the function, and returns the max number and its
index. For example, if you pass [5.1, 6, 8.5, 9, 5.6, 2.7] to the function, you obtain
9 and 3. Write a C++ program and test your function. Take the following note into
consideration when writing your program:
• The function should prevent changing the elements of the passed array.



Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here