Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program to calculate the change given to customer after a purchase. The program must prompt the user to input the cost of

Write a C++ program to calculate the change given to customer after a purchase. The program must prompt the user to input the cost of an item, the amount of money provided for payment. The program must then compute the amount of change and print the cost of the item, the amount of money provided by user for payment, and the amount of change as a dollar value using the dollar sign before the decimal value (remember to setprecision and fixed). Note that the tax rate on the cost is 5 percent and requires use of a constant variable. Call this value TAXRATE. The program should

Prompt the user for input values

Stores the values in variables called cost, cashGiven, and change

Stores the calculation of change in a variable called change

Prints the values of cost, cashGiven, and change along with identifying prompts. See below:

Change : $ 20.00

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

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

=+3-49. Rework Problem 3-48 for an elevation of 5000 ft (1500 m).

Answered: 1 week ago

Question

How can speakers enhance their credibility?

Answered: 1 week ago

Question

What is the best conclusion for Xbar Chart? UCL A X B C B A LCL

Answered: 1 week ago

Question

=+management system of the MNE?

Answered: 1 week ago