Write an algorithm for a a program that computes that amount of money a computer club will receive from proceeds of their Magwinya café sales project. The Magwinya are sold in cases that contain a dozen in each case. Allow the user to enter the number of cases sold and the sale price per gwinya. Each case contains 12 magwinya; each case is purchased at R15.00 per case from a local vendor. The computer club is required to give the SRC 10% of their earnings. Display their proceeds formatted with currency. Display instructions to the user about the application. Display all inputs and calculated values. Write appropriate methods for your solution.
Start
Declare variables numberCasesSold, price, earnings,purchasePrice, SRC
Display "This program computes amount of money acomputer club will receive from proceeds of their Magwinya cafe sales project."
Display "The Magwinya are sold in cases that contain a dozen in each case. Allow the user to enter the number of cases sold and the sale price per gwinya."
Display "Each case contains 12 mawginya; each case is purchased at R15.00 per case from a local vendor. The computer club is required to give the SRC 10% of their earnings. "
Display "Enter the number of cases sold: "
Read numberCasesSold
Display "Enter sale price per gwinya [0-1.25]: "
Read price
Set earnings = numberCasesSold * 12 * price
Set purchasePrice = numberCasesSold * 15
Set earnings = purchasePrice - earnings
Set SRC = earnings * 0.1
Set earnings = earnings - SRC
Display "The number of cases sold: "+ numberCasesSold
Display "Sale price per gwinya: "+ price
Display "The SRC 10%: "+ SRC
Display "The earnings: "+ earnings
Stop
Comments
Leave a comment