Follow the instructions for starting C++ and viewing the Advanced28.cpp file, which is contained in either the
Question:
Follow the instructions for starting C++ and viewing the Advanced28.cpp file, which is contained in either the Cpp8\Chap12\Advanced28 Project folder or the Cpp8\Chap12 folder. (Depending on your C++ development tool, you may need to open the project/ solution file first.) 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 Answer:
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell