Answer to Question #313008 in Algorithms for KeKo

Question #313008

A customer goes and purchases some items at A & R. The store is offering discount to their customers. If a customer spends less than a $100, he/she will only get 5%. If the customer spends $100 or more, but less than $200, he/she will get 10% discount. If the customer spends $200 or more, he/she will get 20% off. Read the amount the customer spent at A&R. Calculate and print the discount amount and the final price after the discount has been deducted.


1
Expert's answer
2022-03-18T03:19:13-0400


Start
    Declare Real amount
    Declare Real discount 
    Display "Enter the amount the customer spent at A&R: "
    Input amount
    if amount<100 then
        discount =amount*0.05
    else if amount>=100 and amount<200 then
        discount =amount*0.1
    else if amount>=200 then
        discount =amount*0.2
    end if
    amount=amount-discount 
    Display "The discount"+discount 
    Display "The final price after the discount"+amount
Stop

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS