Question
The coffee shop sells coffee for $1.25 per cup, bagels for $1.50 each and Danish pastries for $2.25 each. Prompt the user for the number
The coffee shop sells coffee for $1.25 per cup, bagels for $1.50 each and Danish pastries for $2.25 each. Prompt the user for the number of each item being sold, and verify the inputs (separately force each input value to be greater than or equal to zero). The calculation function needs to take the input values, and calculate the subtotal, tax at 9%, and grand total. The output routine will print something like this (without the comments): My Coffee Shop Item Quantity Price Coffee Bagels Danish $3.75 // you may shift $ signs left $3.00 N 1 $2.25 Sub Total $9.00 Tax $.81 // you may print leading Os // before the decimal point $9.81 Total
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started