Bugs4AudraR - BUGS#4 CHAPTER 4 1 This pseudocode should...

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

BUGS #4CHAPTER 41.// 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 rentinga// 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 commissionEarnednum COMM_3 = 100.00num COMM_2 = 75.00num COMM_1 = 55.00num COMM_STUDIO = 30.00num QUIT = 9999getReady()while salesPersonID not = QUITdetailLoop()endwhilefinish()stopgetReady()output "Enter salesperson ID or ", QUIT, " to quit "input salesPersonIDreturndetailLoop()output "Enter name "input salesPersonNameoutput "Enter number of bedrooms rented "input numBedroomsif numBedrooms = 3 thencommissionEarned = COMM_3elseif numBedrooms = 2 thencommissionEarned = COMM_2elseFall 2016Bugs #4Page 1

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture