In the following problems, you will need to: define the problem by constructing a defining diagram, create a solution algorithm using pseudocode, and create a solution algorithm using a flowchart.
Question 3:
Design an algorithm that will prompt the terminal operator for the price of an article and the pricing code. Your program is then to calculate the discount rate according to the pricing code and print to the screen the original price of the article, the discount amount, and the new discounted price. Calculate the pricing code and accompanying discount amount as follows:
Pricing code Discount rate
5090 40%
3310 25%
2510 9%
0 No discount
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.