so that the execution of this function will first display the total sale cost stored in variable totalCost and the total number of sale records stored in recordNum. If aborted is true, then the function will also display an error message to the effect "Input terminated by invalid data at record" followed by the corresponding record value. For example, displayTotalCost(55.55, 3, false) could just display
Total sale cost (3 records) = $55.55
while displayTotalCost(66.66, 7, true) could display
Total sale cost (7 records) = $66.66
Input terminated by invalid data at record 8.
1
Expert's answer
2012-11-12T06:27:38-0500
void displayTotalCost(double totalCost, unsigned recordNum, bool aborted){ if (aborted) { & cout << "Total sale cost (" << recordNum <<" records) = $" << totalCost << endl; } else & cout << "Total sale cost (" << recordNum <<" records) = $" << totalCost << " Input terminated by invalid data at record " << recordNum+1 << "." << endl; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
My satisfacción level is just exelent and good price. The only website that they find the expert , study what you have to see if they can do it and after that, they charge you. I AM Very Happy With ASSIGNMENT EXPERT
Comments
Leave a comment