Question: C++ please People Window Help Main > TIMOTHY MAI's Web page Soccer Referee Payments At club level, a soccer match usually needs three referees, one
People Window Help Main > TIMOTHY MAI's Web page Soccer Referee Payments At club level, a soccer match usually needs three referees, one center referee (R) and two assistant referees (AR). The referee payment is based on the duration of the game and the paid price per minute. However, it is not evenly distributed between the three referees. The payment is split 40% for the center referee and 30% for each ofthe two assistants for example, if a game lasts 80 minutes long and the paid price per minute is $1.50, the payments will be $48.00, $36.00 and 36.00 for a total of $120.00. The referee's, however, do not carry any spare change payments like $124.00 or $125.00? To solve the problem, referee assignors have developed a way to split payments into whole- dollar amounts. This method is described below. Now, you are to write a program to calculate the referees' payments with the following requirements Read from user the information of the game (duration and the price per minute). Make sure the inputs are valid as followed: o Club soccer game duration is between 40 to 90 minutes and in intervals of 10 minutes. o Price per minute is between $1.50 and $5.00. Calculate total payment in whole-dollar amount. Calculate the payment for each referee with the following formula: Split the payment with the 40%, 30%, 30% scale as described above for the tens. if 1 dollar is left, give it to the center referee. If there are 2 dolars left vet each Evenly divide the remaining dollars assistant gets one dollar Print out the result (5 points bonus) Your program should be able to do more than one payment calculation. What to turn in? i Full TO 4) 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
