Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program using functions that calculate the amount given to a customer based on their total The program premps the to either an item

image text in transcribed

Write a program using functions that calculate the amount given to a customer based on their total The program premps the to either an item choice, quantity, and payment amount. Use while loops for all error checking Range for inputs Quantity: (1-20]: (Quantity must be a whole number) Pay amount ($0.00-$100.00|Payment maybe a decimal) bool isvalidchoice (chair) - takes the user choice as an argument, and returns true it is a valid selection Otherwise it returns false. Float calculates the subtotal, and return the grand total with sales tax (5.25%). Float calchange (float, float) - Takes total and the amount paid and returns the change. Amount paid must be higher than the 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_2

Step: 3

blur-text-image_3

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago