Unit 4 Chapter 4 Exercises Cont'd.docx - DEBUG04-01 start...

This preview shows page 1 - 4 out of 7 pages.

DEBUG04-01 start Declarations num salesPersonID string salesPersonName num numBedrooms num COMM_3 = 100.00 num COMM_2 = 75.00 num COMM_1 = 55.00 num COMM_STUDIO = 30.00 num QUIT = 9999 getReady() while salesPersonID = QUIT detailLoop() endwhile finish() stop getReady() output "Enter salesperson ID or ", QUIT, " to quit " input salesPersonID return detailLoop() output "Enter name " input salesPerson output "Enter number of bedrooms rented " input numBedrooms
if numBedrooms = 3 then commissionEarned = COMM_3 else if numBedrooms = 3 then commissionEarned = COMM_2 else if numBedrooms = 3 then commission = COMM_1 else commission = COMM_STUDIO endif endif endif output salesPersonID, salesPersName, comm output "Enter salesperson ID or ", QUIT, " to quit " input salesPersonID return finish() output "End of report" return DEBUG04-02 start Declarations string department num salesQuarter1ThisYear
num salesQuarter2ThisYear num salesQuarter3ThisYear num salesQuarter4ThisYear num salesQuarter1LastYear num salesQuarter2LastYear num salesQuarter3ThisYear num salesQuarter4LastYear

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture