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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started