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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started