Course Hero Logo

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

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 2 out of 5 pages.

BUGS #4CHAPTER 41.// This pseudocode should create a report that contains a rental agent'scommission at// an apartment complex. The program accepts the ID number and name ofthe 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’sname 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

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 5 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
Joan Mast
Tags
The Commission, NUM

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture