Write a function that would calculate an item's sale price based on the item's purchase price plus the tax. The function prototype is double Sale_Price (double, double). The first parameter is the purchase price and the second parameter is the tax. The function will return the sale price of the product. its formula is: Tax Amount= purchase price * (Tax Rate/100) The formula of calculating the final price of an item is: Sale Price = Purchase price + Tax Amount

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question

Write a function that would calculate an item's sale price based on the item's purchase price plus
the tax. The function prototype is double Sale_Price (double, double). The first
parameter is the purchase price and the second parameter is the tax. The function will return the
sale price of the product. its formula is:
Tax Amount= purchase price * (Tax Rate/100)
The formula of calculating the final price of an
item is: Sale Price = Purchase price + Tax Amount
Transcribed Image Text:Write a function that would calculate an item's sale price based on the item's purchase price plus the tax. The function prototype is double Sale_Price (double, double). The first parameter is the purchase price and the second parameter is the tax. The function will return the sale price of the product. its formula is: Tax Amount= purchase price * (Tax Rate/100) The formula of calculating the final price of an item is: Sale Price = Purchase price + Tax Amount
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Returning value from Function
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr