Question: Can you put this code into the RAPTOR program and screen shot it with the outputs Solution Algorithm: Step 1 : Prompt for price, pricing_code
Can you put this code into the RAPTOR program and screen shot it with the outputs
Solution Algorithm:
Step 1: Prompt for price, pricing_code
Step 2: Get price, pricing_code
Step 3: set message to blank
Step 4: set discount amount, new prize to zero
Step 5: CASE OF pricing code
Step 5.1: calculate the discount amount
H: discount_amount = price * 0.5
F: discount_amount = price * 0.4
T: discount_amount = price * 0.33
Q: discount_amount = price * 0.25
Z: message = No discount
Other: message = Invalid pricing code
ENDCASE
Step 6:
IF message = blank THEN
new_price = price discount_amount, new_price
ELSE
Display price, message
ENDIF
END
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
