The Get-Rich-Quick Weight Loss Center awards a prize annually to the client who has lost the most weight. The record of each client contains the following information:
You are to write a program that finds the client who has lost
the most weight this past year, and who will therefore be awarded
the prize. Also find the client who has lost the least weight
(for the "Booby" prize). You may assume that nobody
has actually gained weight, and that there are no ties. Read client
data without assuming a fixed number of clients.
Use the following dataset to test your program. This way I can compare your answer to mine.
| ID Number | 10999 | 16881 | 11123 | 13122 | 11346 | 18338 | 15987 |
| Before | 210 | 205 | 190 | 175 | 177 | 165 | 183 |
| After | 145 | 178 | 190 | 150 | 160 | 143 | 169 |
Hand in the Code and Input/Output
THE FOLLOWING INSTRUCTIONS MAY BE HELPFUL IF YOU ARE HAVING TROUBLE WITH THIS ASSIGNMENT.
Do your assignment in the following stages:
A. HW A - Write a program that will read client data; compute the weight loss for each client; and output the maximum weight lost.
B. HW B - Modify program A. In addition to displaying the maximum weight loss over all clients, also output the id of the client who lost the most weight and print a message of congratulations to the winner.
C. HW C - Modify program B. Also display the id of the client who lost the least weight, and print an appropriate comforting message.