Ask Question
28 February, 06:44

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. 28 February, 10:26
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers