Ask Question
31 May, 00:43

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. 31 May, 03:20
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers