Using only the sequential operations described in Section 2.2.2, write an algorithm that gets two values: the price for item A and the quantity purchased. The algorithm should then print the total cost and the total cost plus an 8% sales tax.

Respuesta :

Answer:

total_cost = cost + tax

Explanation:

Step1) Let the 2 variable for take input from user e.g price and quantity

var price ;

var quantity ;

var cost ;

var tax ;

var total_cost ;

Step2) take input from user quantity of item 'A'

step3) cost = price * quantity

Step4) tax = 0.08 * cost

Step5) total_cost = cost + tax

Step6) print the total_cost