$51.00 |→ solution ./salesTax Enter the price: 54.30 $54.30 + $4.20 $58.50 solution So you'll print out the price (always with 2 decimal places) with some spaces and a $, then the tax you calculated, then 10 =s, and then the total. Watch out for the spaces!
$51.00 |→ solution ./salesTax Enter the price: 54.30 $54.30 + $4.20 $58.50 solution So you'll print out the price (always with 2 decimal places) with some spaces and a $, then the tax you calculated, then 10 =s, and then the total. Watch out for the spaces!
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
using C++, refer the the 2 pics attached.

Transcribed Image Text:6:26 PM
y
ent
df
$51.00
→ solution ./salesTax
Enter the price: 54.30
$54.30
+ $4.20
I PM
$58.50
→ solution
CK
So you'll print out the price (always with 2 decimal places) with some spaces and a $,
then the tax you calculated, then 10 =s, and then the total. Watch out for the spaces!
t
) PM
Compile your code with g++ -std%3c++17 salesTax.cpp -o salesTax and verify
that it's working correctly.
Ink
MinGW
Installer.Ink
lab01 (1).pdf
79728068259.JPEG
GMT20210813-0....txt
GMT20210813-0....vtt
GMT20210813-....mp4
Show All
PEr
18,049
AUG 1
26
W
X

Transcribed Image Text:PM
Part 3: Write a sales tax calculator for a world without
ent
df
pennies or nickels
For this program, you will get an input price from the user, and then you will calculate
7.75% sales tax rounded to the nearest dime. You'll have to think a little bit about
how to round a number to the nearest tenth rather than to the nearest whole number.
You can do it with cout alone, or you can use round () function-but either way it's
going to take a trick. Take a look at the <cmath> library documentation for more
information on the round () function.
4 PM
See the end of this document for a hint!
After you've calculated the sales tax, you'll output the total price as well, and the
autograder will be looking for a specific kind of formatting. Here are some examples of
my solution's output to give you an idea of how your formatting should look:
solution ./salesTax
Enter the price: 12.20
$12.20
+ $0.90
CK
ot
O PM
$13.10
|→ solution ./salesTax
Enter the price: 47.30
$47.30
+ $3.70
Ink
$51.00
→ solution ./salesTax
Enter the price: 54.30
MinGW
Installer.Ink
lab01 (1).pdf
79728068259.JPEG
GMT20210813-0....txt
GMT20210813-0....vtt
GMT20210813-....mp4
Show All
(18,049
AUG 1
W
X
26
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education