Question: Write a program that computes the amount of money a computer club will receive from the proceeds of their candy sales project. The user will
Write a program that computes the amount of money a computer club will receive from the proceeds of their candy sales project.
The user will enter the following in the console: clubName casesSold
The constants will be: salePrice is $0.75 per candy bar
caseCost is $5.00 per case
barsPerCase is 12
commissionRate is 10%
The computations will be:
The calculatedSales will be the casesSold * barsPerCase * salePrice
The calculatedCost will be the casesSold * caseCost
The commission will be the (calculatedSales calculatedCost) * commissionRate
The netProceeds will be calculatedSales- calculatedCost - commission
Display a formatted output showing their proceeds with currency and only 2 digits behind the decimal point.
An example of the desired output is as follows: The (clubName) computer club produced $(calculatedSales) from their candy sales project. The total cost of the candy was $(calculatedCost), The student government commission amount was $(commission). The net proceeds was $(netProceeds).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
