Question: Write code for the below algorithm Read the following algorithm to determine the level of discount a buyer receives based on the number of products
Write code for the below algorithm
Read the following algorithm to determine the level of discount a buyer receives based on the number of products being purchased, and to output the discounted price. . . = Prompt the user for the total regular price of the purchase
Read in the total regular price of the purchase If the total regular price is greater than $100, then discount = 0.2 (i.e. 20%), otherwise, discount = 0.1 (.e. 10 %)
Compute: discounted price = (1 - discount) x total regular price
Output the discounted price =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
