Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Combinatorial Testing In Cloud Computing

Authors: Wei-Tek Tsai ,Guanqiu Qi

1st Edition

9811044805, 978-9811044809

More Books

Students also viewed these Programming questions

Question

Find E[X] where X is the outcome when we roll a fair die.

Answered: 1 week ago