Problem

Follow the instructions for starting C++ and viewing the Advanced27.cpp file, which is c...

Follow the instructions for starting C++ and viewing the Advanced27.cpp file, which is contained in either the Cpp7\Chap12\Advanced27 Project folder or the Cpp7\Chap12 folder. (Depending on your C++ development tool, you may need to open the project/ solution file first.) If necessary, delete the two forward slashes that appear before the system("pause"); statement, and then save the program. Notice that the pay codes in the array are in ascending numerical order. The user will enter the pay code to search for in the array. The program should search for the pay code in the first column of the array, but the search should begin in the middle row, which is row 4. If the pay code the user is searching for is located in the first column of row 4, the program should display the corresponding pay rate from the second column in row 4. If the pay code the user is searching for is greater than the pay code in row 4’s first column, the search should continue in rows 5, 6, and 7. However, if the pay code the user is searching for is less than the pay code in row 4’s first column, the search should continue in rows 3, 2, and 1. Save and then run the program. Hint: To verify that the search works appropriately, use counters to keep track of the number of greater than comparisons made and the number of less than comparisons made.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 12