Company Problem -

* We sell a variety of widgets.
* The user has found the widget s/he wants and now wants to buy it.
* The user needs to know the name of the widget bought, the price of the widget before and after the 8% tax, and the final widget price. 


Solve the Problem -

1. Determine the name of the widget the user wants to purchase.
2. Store the name of this widget to recall later.
3. Parse through the company's online inventory and search for the stored widget name.
4. Find the price of the stored widget once it's located. 	
5. Store the price of the stored widget.
6. Calculate what the 8% tax would be.
7. Calculate the total price of the user's widget by adding on the tax amount to the pre-tax widget price.
8. Display the name of the user's widget.
9. Display the pre-tax widget price.
10. Display the 8% tax amount.
11. Display the final cost of the widget after the 8% tax.


Translate the Steps to Pseudocode -

CREATE variables widgetName, widgetCost, widgetTax, finalCost
PROMPT for the widget's name (widgetName)
READ the widget's name
GET the widget's cost (widgetCost)
READ the widget's cost
CALCULATE the widget tax (widgetTax = 0.08 * widgetCost)
CALCULATE the final cost (finalCost = widgetPrice + widgetTax)
DISPLAY widgetName
DISPLAY widgetCost
DISPLAY widgetTax
DISPLAY finalCost


Back to Iris Tsing, COIN 70a