// 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: C only
Q: You are examining the impact of fish predators in a Trinidad stream on the life history traits of a…
Q: Question 11 Listen The minimum number of binary bits needed to represent the unsigned decimal…
Q: Just trying to check my answer. And find out where I went wrong.
Q: Which organism has the highest parity? Group of answer choices An organism that produces one…
Q: QUESTION 10 Find the exact distance between the two parallel planes given by 3x+5y+z=4 and…
Q: Imagine you have 3 separate plots each seeded with 3 species, a ruderal, a competitor, and a stress…
Q: Same prompt, different question: Suppose you are a researcher studying a population of beach mice…
Q: In a population of flowers, there is variation in petal size, with some flowers having very small…
Q: Which of the following examples is the only one to likely be under the influence of natural…
Q: Which of the following best describes the role of recombination in genetic variation? Group of…
Q: The Mexican spotted owl and the Northern spotted owl used to be the same species. They were…
Q: What is the importance of freshwater wetlands? Group of answer choices They are a great defense…
Q: You explore a coastal area where dense forests of salt-tolerant trees grow in shallow water. The…
Q: The biome [Select] [Select] tundra tropical rainforest tropical seasonal forest subtropical desert…
Q: Which biome is characterized by hot, dry summers and cold, harsh winters, contains a thick topsoil…
Q: - Average temperature (°C) 500 400 300 200 100 80 30 60 20 40 20 10 0 -10 20 JFMAMI ASOND Month…
Q: Based on the following information, identify the true statement about the two North American cities,…
Q: What will happen to the pressure and movement of air once it heats up? Group of answer choices The…
Q: Why do temperatures generally vary less in the Southern Hemisphere than in the Northern Hemisphere?…
Q: What weather conditions are typically associated with the Intertropical Convergence Zone (ITCZ)?…