The programming language: C++ The requirements of reports: 1.The algorithm design idea 2.The source code with necessary comments 3.Test case and results (show the screenshot of your terminal);...



The programming language:  C++



The requirements of reports:


1.The algorithm design idea


2.The source code with necessary comments


3.Test case and results (show the screenshot of your terminal);


4.Summary



Binary Search



[Problem description]


Given the grade list of students in a class and your grade, find your position of


Ken in the list according to his grade by the binary search method. The grade


list is an ordered list and sorted ascendingly. The maximal length of the grade


list is 100.



[Basic requirements]


Use the binary search method.



[Example]



What you need to show in the terminal(the back part is outputted by you



and the blue part is inputted by the user, i.e., teacher):


Please input the student grade list:


Alice:73


Bob:80Mark:82


David:84


Jenny:89


Maria:93


Please input the grade of Ken:


90


The position of Ken is:


6



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here