DebugChapter4 - This pseudocode should create a report that...

  • ECPI University
  • CIS 121
  • Rebmoo9847
  • 4
  • 93% (15) 14 out of 15 people found this document helpful

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

// This pseudocode should create a report that contains a// rental agent's commission at an apartment complex. The// program accepts the ID number and name of the agent who// rented the apartment, and the number of bedrooms in the// apartment. The commission is $100 for renting a three-bedroom// apartment, $75 for renting a two-bedroom apartment, $55 for// renting a one-bedroom apartment, and $30 for renting a studio// (zero-bedroom) apartment. Output is the salesperson’s name and// ID number and the commission earned on the rental.startDeclarationsnum salesPersonIDstring salesPersonNamenum numBedroomsnum COMM_3 = 100.00num COMM_2 = 75.00num COMM_1 = 55.00num COMM_STUDIO = 30.00num QUIT = 9999num commissionEarnedHousekeeping()while salesPersonID <> QUITdetailLoop()endwhilefinish()stopHousekeeping()output "Enter salesperson ID or ", QUIT, " to quit "input salesPersonIDreturndetailLoop()output "Enter name"input salesPersonoutput "Enter number of bedrooms rented "input numBedroomsif numBedrooms = 3 thencommissionEarned = COMM_3elseif numBedrooms = 2 then

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture