This exercises simulates an e-commerce checkout process, and provides a bit of drill-down on variables, type conversion, input and output.
Instructions:
Prompt the user to enter the price of three items (one at a time, each with its own prompt)
Prompt the user to enter the quantity of the first item, then the second item, then the third item (one prompt at a time)
Note: that's a total of six prompts.
Convert the user's input into numeric values
Calculate the total cost for each item by multiplying the price (of that item) by the quantity (of the same item)
Calculate the grand total by summing the total costs of the three items
Display the grand total to the user
Stretch Goal:
Add sales tax to the grand total and display both the tax amount for their order, and the new total (with tax). Assume a tax rate of 5%. (Tip: Divide the tax rate by 100 and then multiply that times the grand total.)
This exercises simulates an e-commerce checkout process, and provides a bit of drill-down on variables, type conversion, input and output.
Instructions:
Stretch Goal: