To create a proper algorithm for the discount scenario you provided, we need to organize the lines of code in a logical sequence. Here is the correct order:
- INPUT total
- IF total > 200 THEN
- OUTPUT you get a 20% discount
- ELSE IF total < 200 AND total > 100 THEN
- OUTPUT you get a 10% discount
- ELSE
- OUTPUT you get no discount
This way, the program first asks for the user’s spending total, then evaluates the total to determine the applicable discount.