Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions To make a profit, a local store marks up the prices of its items by a certain percentage. Write a C + + program

Instructions
To make a profit, a local store marks up the prices of its items by a certain percentage.
Write a C++ program that reads:
The original price of the item sold
The percentage of the marked-up price
The sales tax rate.
The program then outputs:
The original price of the item
The percentage of the mark-up
The stores selling price of the item
The sales tax rate
The sales tax
The final price of the item.
(The final price of the item is the selling price plus the sales tax.)
Since your program handles currency, make sure to use a data type that can store decimals.
Task #01: Correct output calculated and displayed
Test Feedback:
Status: FAILED!
Check: 1
Test: Test case 1
Reason: Unable to find '['100','29.9','129.9','8.6','11.1714','141.071']' in the program's output.
Enter the original price of the item: Enter the percentage of the mark-up: Enter the sales tax rate (as a percentage): Original price of the item: $100.00
Percentage of the mark-up: 29.90%
Store's selling price of the item: $129.90
Sales tax rate: 8.60%
Sales tax: $11.17
Final price of the item: $141.07
.
Error : AssertionError - Unable to find a number close enough to 11.1714(+/-0.00) in the program's output.
Timestamp: 2024-01-1915:37:47.742306
Status: FAILED!
Check: 2
Test: Test case 2
Reason: Unable to find '['23.95','30.29','31.204','7.9','2.465','33.669']' in the program's output.
Enter the original price of the item: Enter the percentage of the mark-up: Enter the sales tax rate (as a percentage): Original price of the item: $23.95
Percentage of the mark-up: 30.29%
Store's selling price of the item: $31.20
Sales tax rate: 7.90%
Sales tax: $2.47
Final price of the item: $33.67
.
Error : AssertionError - Unable to find a number close enough to 31.204(+/-0.00) in the program's output.
Timestamp: 2024-01-1915:37:47.745116

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

More Books

Students also viewed these Databases questions