95%(19)18 out of 19 people found this document helpful
This preview shows page 26 - 29 out of 396 pages.
Find the Bugs1.Your downloadable files for Chapter 5 include DEBUG05-01.txt, DEBUG05-02.txt, and DE
num monthCounter// monthCounter must be declarednum yearCounterhousekeeping()while acctNUm <> QUITprintCoupons()endwhilefinish()stophousekeeping()print "Enter account number or ", QUIT, " to quit "input acctNumreturnprintCoupons()yearCounter = 1// yearCounter must start with 1 for each new customerwhile yearCounter <= YEARSmonthCounter = 1// monthCounter must start with 1 for each new yearwhile monthCounter <= MONTHSprint acctNum, monthCounter, yearCounter, MSGmonthCounter = monthCounter + 1endwhileyearCounter = yearCounter + 1// yearCounter must increaseendwhileoutput "Enter account number or ", QUIT, " to quit "input acctNumreturnfinish()output "End of job"returnDEBUG05-03// This program displays every combination of three-digitsstartDeclarationsnum digit1 = 0num digit2 = 0num digit3 = 0while digit1 <= 9while digit2 <= 9while digit3 <= 9output digit1, digit2, digit3
2.Your downloadable files for Chapter 5 include a file named DEBUG05-04.jpg that contains