Question: Write an interactive program that calculate the total price of tomato plants after including the sales tax using p = p + p*t where p

Write an interactive program that calculate the total price of tomato plants after including the sales tax using

p = p + p*t

where p = price of the plant in dollars and cents (e.g. 5.99) and

t = tax rate as a decimal (e.g. 6% tax rate is equivalent to t=0.06)

You must prompt the user for price of the plant p and the tax rate t and must account for the fact that neither price nor tax rate can be negative. The program must print out the correct total price

Example: if I input 10 for price of plant and tax is 6% for t the program should output 10.60 ($10 and 60).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!