Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

6. Ulsing only the instructions shown in Figure 1-12, write two versions of an a

ID: 3743287 • Letter: 6

Question

6. Ulsing only the instructions shown in Figure 1-12, write two versions of an algorith that displays the total amount each customer owes for concert tickets. Be sure to the instructions appropriately. indent 8. ealeuilate the amount owed oy multiplying the number of tiokets oy 45 display the amount owed display the message You cavn purchase up to 4 tickets only. end if end repeat enter the number of tickets if (the number of tickeets is greater than 4) if (the number of tickets is less than or equal to 4) repeat for (each customer) Figure 1-12

Explanation / Answer

Algorithm that displays the total amount each customer owes for concert tickets

Version 1:

repeat for (each customer)

               enter the number of tickets

               if (the number of tickets is greater than 4)

                              display the message "You can purchase up to 4 tickets only"

               else

                              calculate the amount owed by multiplying the number of tickets by $35

                              display the amount owed

               end if    

end repeat         

Version 2 :

repeat for (each customer)

               enter the number of tickets

               if (the number of tickets is less than or equal to 4)

                              calculate the amount owed by multiplying the number of tickets by $35

                              display the amount owed

               else

                              display the message "You can purchase up to 4 tickets only"

               end if    

end repeat

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote