Question: Write a program using arrays that reads a number of integer values from the terminal until a -1 is entered and then calls a function

Write a program using arrays that reads a number of integer values from the terminal until a -1 is entered and then calls a function that returns the index of the smallest element (not the smallest element).

Enter integer values or -1 to quit

10

90

8

2

67

22

56

-1

10 90 8 2 67 22 56

The minimum value's index is 3 and the minimum is 2

Press any key to continue

Notes: loop, function, arrays will be used. Copy your source code (xxx.cpp) and screenshot running results, and save them in a word document.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!