answersLogoWhite

0


Best Answer

I'd first add an input line of some sort, prompting the user to enter the amount.

Next, take the text that's entered and give an error if it's not numeric.

If it is numeric text, convert it to a real number.

Then depending on whether or not the two separate taxes are supposed to be compounded, either multiply it by 1.04 and again by 1.02, or simply multiply it by 1.06 (the former of the two options if it's compounded).

Finally, output the number, rounding to the nearest hundredth.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How would you design a program that asks a user to enter the amount of a purchase and calculate a state sales tax of 4 percent and county tax of 2 percent and give the total of the sale?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Calculate the amount of discount on the purchase of a pair of shoes original price 55.00 percent discount is 15 percent?

$54.85


Calculate the amount of discount on the purchase of a pair of shoes?

8.25


How do you a multiplier to calculate a percentage increase?

percent increase=(new amount-original amount) _____________________ original amount


Describe how to find the cost of a purchase if you know the percent of the tax and the amount of the sales tax on the purchase?

take the amount of the sales tax and divide it by the percent of the tax... i was on that same question on my hw


How do you calculate 350 is 79 percent of what amount?

Divide 350 by 79% .


How to calculate nickel percent in chocolates?

There is really no way to calculate nickel percent in chocolates. There will be a different amount in all kinds of chocolates and none in some.


How do you calculate percent abundance for silicon?

You calculate the total amount of whatever it is that you want to find the silicon abundance for. Then you calculate the amount f silicon in that. Then percentage abundance of silicon = 100*amount of silicon/total amount Typically the amount would be measured as the mass.


How do you calculate percent reduction?

-- Divide the new amount by the original amount. -- Multiply the quotient by 100. -- Subtract 100 from the product. -- The difference is the percent reduction.


How do you calculate 2 percent?

Two percent is equal to .02 so you can multiply by that amount. For example 2% of 397 is 7.94


What is 25 percent of 44.99?

33.7425, which will round to 33.74 ; percent off means to calculate the percentage, then subtract from the original amount.


What is the sales tax of 400000 if the sales tax is 1.5 percent?

You have to calculate 400,000 x 1.5 / 100. (Percent means hundredths; the idea is to calculate 1.5 hundredths of the amount.)


Calculate the simple interest on the amount of 567.23 at 5 percent for two years?

56.72