Question: Programming Assignment Code in C + + The Get - Rich - Quick Weight Loss Center awards a prize annually to the client who has
Programming Assignment Code in C
The GetRichQuick 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:
name
"before" weight in pounds
"after" weight in pounds
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. 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 a sentinel value to end
the input data Use the following datasets to test your program.
Data Set #
Data Set # Data Set #
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 name of the client who lost the most weight and print a message of congratulations to the winner. Use the class library.
C HW C Modify program B Also display the name of the client who lost the least weight, and print an appropriate comforting message.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
