Put the following lines of code in order to create an algorithm for this situation: if you spend more than $200, you get a 20 percent discount. If you spend less than $200 but more than $100, you get a 10 percent discount. The user inputs their spending total, and the program tells them if they get a discount and, if so, what percentage the discount will be. (Note: There is a check answer button. You have one opportunity to check your answer before submitting.)(7 points)Arrange responses in the correct order to answer the question. Select a response, navigate to the desired position and insert response at that position. Responses can be selected and inserted using the space bar, enter key, left mouse button or touchpad. Responses can be moved using the up and down arrow keys or by dragging with a mouse.INPUT total     OUTPUT you get a 20% discountELSE IF spending < 200 AND spending > 100 THEN     OUTPUT you get a 10% discountIF total > 200 THENELSE     OUTPUT you get no discount

1 answer

To create the algorithm for the described situation, you can arrange the lines of code in the following order:

  1. INPUT total
  2. IF total > 200 THEN
  3. OUTPUT you get a 20% discount
    
  4. ELSE IF total < 200 AND total > 100 THEN
  5. OUTPUT you get a 10% discount
    
  6. ELSE
  7. OUTPUT you get no discount
    

This order ensures that the program checks the user's spending total correctly and provides the appropriate discount message based on the specified criteria.