question archive Design an algorithm that will prompt a terminal operator for the price of an article and pricing code

Design an algorithm that will prompt a terminal operator for the price of an article and pricing code

Subject:Computer SciencePrice: Bought3

Design an algorithm that will prompt a terminal operator for the price of an article and pricing code. Your program is then to calculate a discount rate according to the pricing code and print to the screen the original price of the article, the discount amount and the new discount price. Calculate the price. Calculate the pricing code and accompanying. Discount amount as follows:

Pricing code

H

F

T

Q

Z

Discount rate

H = 50%

F = 40%

T = 33%

Q = 25%

Z = 0%

 

If the pricing code is Z, the words 'No discount' are to be printed on the screen. If the pricing code is not H, F, T, Q, or Z, the words 'Invalid pricing code' are to be printed.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE