// A standard mortgage is paid monthly over 30 years. // This program is intended to display 360 payment coupons // for a new borrower. Each coupon lists the month number, // year number, and a friendly mailing reminder.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 2CP
icon
Related questions
Question

// A standard mortgage is paid monthly over 30 years.

// This program is intended to display 360 payment coupons

// for a new borrower. Each coupon lists the month number,

// year number, and a friendly mailing reminder.

start

   num MONTHS = 12

   num YEARS = 30

   string MSG = "Remember to allow 5 days for mailing"

   num monthCounter = 0

   num yearCounter = 30

    while yearCounter <= YEARS

       while monthCounter <= MONTHS

         output monthCounter, yearCounter, MSG

      endwhile

   endwhile

stop

 

housekeeping()

   print "Enter account number or ", QUIT, " to quit "

return

 

printCoupons()

   while yearCounter <= YEARS

      while monthCounter <= MONTHS

         print acctNum, monthCounter, yearCounter, MSG

         monthCounter = monthCounter + 1

      endwhile

      yearCounter = yearCounter + 1

   endwhile

   output "Enter account number or ", QUIT, " to quit "

   input acctNum

return

 

finish()

   output "End of job"

return

// A standard mortgage is paid monthly over 30 years.
// This program is intended to print 360 payment coupons
// for each new borrower at a mortgage comapny. Each coupon
// lists the month number, year number, and a friendly mailing reminder.
start
Declarations
num MONTHS = 12
num YEARS = 360
string MSG = "Remember to allow 5 days for mailing"
num acctNum
num monthCounter
num yearCounter
housekeeping ()
while acctNUm <> QUIT
printCoupons ()
endwhile
finish()
stop
housekeeping()
print "Enter account number or ", QUIT,
to quit "
return
printCoupons ()
while yearCounter <= YEARS
while monthCounter <= MONTHS
print acctNum, monthCounter, yearCounter, MSG
monthCounter = monthCounter + 1
endwhile
yearCounter + 1
yearCounter
endwhile
output "Enter account number or ", QUIT,
input acctNum
to quit
return
finish()
output "End of job"
return
Transcribed Image Text:// A standard mortgage is paid monthly over 30 years. // This program is intended to print 360 payment coupons // for each new borrower at a mortgage comapny. Each coupon // lists the month number, year number, and a friendly mailing reminder. start Declarations num MONTHS = 12 num YEARS = 360 string MSG = "Remember to allow 5 days for mailing" num acctNum num monthCounter num yearCounter housekeeping () while acctNUm <> QUIT printCoupons () endwhile finish() stop housekeeping() print "Enter account number or ", QUIT, to quit " return printCoupons () while yearCounter <= YEARS while monthCounter <= MONTHS print acctNum, monthCounter, yearCounter, MSG monthCounter = monthCounter + 1 endwhile yearCounter + 1 yearCounter endwhile output "Enter account number or ", QUIT, input acctNum to quit return finish() output "End of job" return
Chapter 4 Debug 2
II A standard mortgage is paid monthly over 30 years.
I/ This program is intended to display 360 payment coupons
Il for a new borrower. Each coupon lists the month number,
Il year number, and a friendly mailing reminder.
start
num MONTHS = 12
num YEARS = 30
string MSG = "Remember to allow 5 days for mailing"
num monthCounter = 0
num yearCounter = 30
while yearCounter <= YEARS
while monthCounter <= MONTHS
output monthCounter, yearCounter, MSG
endwhile
endwhile
stop
housekeeping()
print "Enter account number or ", QUIT, " to quit "
return
Transcribed Image Text:Chapter 4 Debug 2 II A standard mortgage is paid monthly over 30 years. I/ This program is intended to display 360 payment coupons Il for a new borrower. Each coupon lists the month number, Il year number, and a friendly mailing reminder. start num MONTHS = 12 num YEARS = 30 string MSG = "Remember to allow 5 days for mailing" num monthCounter = 0 num yearCounter = 30 while yearCounter <= YEARS while monthCounter <= MONTHS output monthCounter, yearCounter, MSG endwhile endwhile stop housekeeping() print "Enter account number or ", QUIT, " to quit " return
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
ListBox
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

Expert Answers to Latest Homework Questions

Q: A natural gas fuel mixture has the molar analysis shown below. Determine the molar analysis of the…
Q: What drawbacks exist when it comes to idss overall Do you think Expert Systems are better than…
Q: Please Original work Talk about probability versus impact matrix for your family ski trip with at…
Q: Please original work Talk about the general processes that should be followed in managing risks…
Q: A success story highlights job candidates' skills by explaining how they dealt with a challenging…
Q: A9 i need all solution......
Q: Vertical Asymptote of Tan(piex)
Q: What is the coefficient of O2 when the following equation is balanced?C2H4O + O2 → CO2 + H2O
Q: Let M be a 3 x 3 invertible matrix. Q2.1 Then det (2M-1) = none of the above -2 det (M) 1 8 det(M) 8…
Q: Let A = -2 3 1 0 -1 1 0 2 1 Then cofactor, C2,1 =
Q: a b с Let A = d e f and det(A): == 2. d+2a g h j e+2b f+2c Let B = g h 3d Зе 3f Then det(B)
Q: Aluminum reacts with element X to form a compound with the formula Al2X3. Element X exists as…
Q: Aluminum reacts with element X to form a compound with the formula Al2X3. Element X exists as…
Q: Please original work Use Backward or Forward-Chaining Reasoning to solve a complex, but common,…
Q: What is the measure of HJ in degrees? (ONLY WRITE THE NUMBER) I 85° 150° J H
Q: Give detailed Solution with explanation of all options
Q: What is the area for the shaded sector? r=9 cm 80° Use 6.28 sq cm 254.34 sq cm 56.52 sq cm 226.08 sq…
Q: What is the area for the shaded sector? 60° d-12 m 3.14 sq m 6.27 sq m 18.84 sq m 75.36 sq m…
Q: What is the circumference for a circle with radius 7.5 cm? 23.55 cm 47.1 cm 176.625 cm 706.5 cm
Q: 2. (a) Use an isometry to find angle ABC when A = 0, B = ½, and C = 벌. (b) Now compute ACB, and thus…
Q: Use OO What is the measure of the central angle for the circle below? 1=7 in 126 163 175 252 -10 in