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

Write a function that would calculate an item's sale price based on

 

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

Step by Step Solution

3.40 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answer double SalePricedouble purchasePrice doubl... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!