You are making a bundle on your dating
program! However, the women now want
more than one match. You would like to
give them the entire list, sorted according to the desirability of the men.
Modify your program by doing the
following:
1. Replace the best variable with an
array of integers called rating which holds the rating of each man.
2. Write a function Sort
which sorts the names and ratings of the men according to their rating.
3. Print the entire list of men ordered
according to their desirability along with their rating. A typical output is shown below.
The best matches for Jill are:
Oliver 20
Bob 23
Larry 23
Ken 24
Manfred 26
Alan 26
Nick 27
Charles 29
Ivan 30
Harold 31
Jack 32
Greg 32
Fred 32
Dan 34
Evan 36