Question: Write a method that asked the user for an expensive and allows to adding more expensive as many times as would like. Print a summary
Write a method that asked the user for an expensive and allows to adding more expensive as many times as would like. Print a summary total number expenses, total expenses, and average cost per expense (e.g. "4 items, $20 total spent, $5 over goes per item". Finally, return (as opposed to printing out) the total expenses (e.g. in the above example, you would return 20). Assume that the user will always give a positive non-zero number (i.e. no input validation required for this method). (Suggested time spent;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
