subject

Debug : // This pseudocode should create a report that contains an
// apartment complex rental agent's commission. 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.
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 "
output salesperson_ID
return

detailLoop()
output "Enter name "
input salesPersonName
output "Enter number of bedrooms rented "
input numBedrooms
if numBedrooms > 3 then
commissionEarned = COMM_3
else
if numBedrooms < 2 then
commissionEarned = COMM_2
else
if numBedrooms > 1 then
commission = COMM_1
else
commission = COMM_4
endif
endif
endif
output salesPersonID, salesPersName, commissionEarned
output "Enter salesperson ID or ", QUIT, " to quit "
input salesPersonID
return

finish()
output "End of report"
return

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:10, shimmerandshine1
When you reach a yield sign, yield to cross traffic and before you enter the intersection. a. flash your headlights b. wait for a signal c. wait five seconds d. wait for a safe gap
Answers: 1
image
Computers and Technology, 22.06.2019 04:50, edenlbarfield
Which are steps taken to diagnose a computer problem? a) reproducing the problem and using error codes b) reproducing the problem and troubleshooting c) using error codes and troubleshooting d) using error codes and stepping functions
Answers: 1
image
Computers and Technology, 23.06.2019 08:00, hernandez09297
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
image
Computers and Technology, 24.06.2019 18:30, txa95
After making a powerpoint presentation about a new line of clothing designs, henri notices that he used the word “gorgeous” on nearly every slide. what would be the  best  way to add more variety to his wording by using tools within powerpoint? using the thesaurus under the view tab, and then using the find dialog box to find and replace every instance of “gorgeous”using the spelling checker under the view tab, and then using the find dialog box to find every instance of “gorgeous” and change some of themusing the thesaurus under the review tab, and then using the find dialog box to find every instance of “gorgeous” and change some of themusing the spelling checker under the review tab, and then using the find dialog box to find and replace every instance of “gorgeous”
Answers: 2
You know the right answer?
Debug : // This pseudocode should create a report that contains an
// apartment complex rent...

Questions in other subjects:

Konu
Health, 25.05.2021 22:30
Konu
Mathematics, 25.05.2021 22:30