Question: this is the code i have right now and the code isnt running how it should be , can anyone help me . Im at
this is the code i have right now and the code isnt running how it should be can anyone help me Im at a lost. I also need help with designing a flow chart diagram.
#include
#include
using namespace std;
int getGameDuration
int duration;
cout "Enter the game information as followed:
;
cout"Duration of the game in minutes between and intervals of : ;
cin duration;
while duration duration duration
cout "Your input for duration is Invalid! Please try again.
;
cout "Duration of the game in minutes between and intervals of : ;
cin duration;
return duration;
double getPricePerMin
double pricePerMin;
cout
;
cout "Price per minute between $ and $: $;
cin pricePerMin;
while pricePerMin pricePerMin
cout "Your input for price is Invalid! Please try again.
;
cout "Price per minute between $ and $: $;
cin pricePerMin;
return pricePerMin;
int calculateTotalPaymentint duration, double pricePerMin
return duration pricePerMin;
void calculateRefPaymentsdouble totalPayment, double& centerRef, double& assistantRef
int totalpayment getGameDuration getPricePerMin;
double centerref, assistantref;
totalpayment inttotalpayment;
int paymenttodivide totalpayment;
int remainingpayment paymenttodivide ;
paymenttodivide paymenttodivide remainingpayment;
centerref paymenttodivide ;
assistantref paymenttodivide ;
int sharesofremaining remainingpayment ;
remainingpayment remainingpayment ;
centerref sharesofremaining;
assistantref sharesofremaining;
if remainingpayment
centerref ;
else if remainingpayment
assistantref ;
void printResultsint duration, double pricePerMin, double totalPayment, double centerRef, double assistantRef
cout
Referee Payment Breakdown:
;
cout "Game duration: duration minutes
;
cout "Price per minute: $ fixed setprecision pricePerMin
;
cout "Total payment: $ fixed setprecision totalPayment
;
cout "Center Referee's payment: $ fixed setprecision centerRef
;
cout "Assistant Referee's payment: $ fixed setprecision assistantRef
;
void refPaymentCalculation
char choice y;
while choice y choice Y
int duration;
double pricePerMin;
getGameInformationdurationpricePerMin;
double totalPayment calculateTotalPaymentduration pricePerMin;
double centerRef, assistantRef;
calculateRefPaymentstotalPayment centerRef, assistantRef;
printResultsduration pricePerMin, totalPayment, centerRef, assistantRef;
cout
;
cout Do another calculation yn;
cin choice;
int main
refPaymentCalculation;
return ;
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
