Ask Question

write an algorithm that gets the price for item A plus the quantity purchased. The algorithm prints the total cost, including a 6% sales tax.

+2
Answers (1)
  1. 24 April, 17:48
    0
    Algorithm ()

    1. p = Enter the price of item A.

    2. c = Enter the number of A's purchased.

    3. Now the price per item with tax is:

    t = p + (p*6/100)

    4. The total cost of c items:

    ct = t * c.

    5. Print ct.

    In this algorithm, we are taking the price per item and counting it's cost including tax. Then we are multiplying the price per item with tax with the number of items we purchase, to find the overall cost with tax.

    You may calculate the overall cost without tax as (p*c). Then you can find the overall cost with tax as ((p*c) + (p*c*6/100)), as in both way, we will get the same result.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “write an algorithm that gets the price for item A plus the quantity purchased. The algorithm prints the total cost, including a 6% sales ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers