Find the bugs debug05 01 this program is supposed to

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 declared num yearCounter housekeeping() while acctNUm <> QUIT printCoupons() endwhile finish() stop housekeeping() print "Enter account number or ", QUIT, " to quit " input acctNum return printCoupons() yearCounter = 1 // yearCounter must start with 1 for each new customer while yearCounter <= YEARS monthCounter = 1 // monthCounter must start with 1 for each new year while monthCounter <= MONTHS print acctNum, monthCounter, yearCounter, MSG monthCounter = monthCounter + 1 endwhile yearCounter = yearCounter + 1 // yearCounter must increase endwhile output "Enter account number or ", QUIT, " to quit " input acctNum return finish() output "End of job" return DEBUG05-03 // This program displays every combination of three-digits start Declarations num digit1 = 0 num digit2 = 0 num digit3 = 0 while digit1 <= 9 while digit2 <= 9 while digit3 <= 9 output digit1, digit2, digit3
2.Your downloadable files for Chapter 5 include a file named DEBUG05-04.jpg that contains

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture