// 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: For #4 on Step 3, why are they assuming annual sales for 5,000? Where would that number come from?
Q: Can you help me describe a specific application situation from say uraban growth, enviromental…
Q: Consider the following data for a hypothetical economy that produces two goods, milk and honey.…
Q: Provide Correct solution
Q: Want Answer please provide it
Q: What should the Van't Hoff Factor for acetic acid be? O3 00 O 1 O2 O Around 1.1-1.2
Q: Resistor and RC Circuits Problem 11:   Consider the following circuit of three resistors (R1, R2,…
Q: IN 2016, AN INDIVIDUAL EARNED $65,000 OF EMPLOYMENT INCOME. THE FOLLOWING DEDUCTIONS WERE MADE FROM…
Q: Maureen Smith is a single individual. She claims a standard deduction of $12,000. Her salary for the…
Q: Lake Co. receives non-refundable advance payments with special orders for containers constructed to…
Q: For the 6-carbon molecule below, how would you expect it to break into two pieces? one 2 carbon unit…
Q: Resistor and RC Circuits Problem 14:   Consider a circuit shown in the figure. Ignore the internal…
Q: Resistor and RC Circuits  Problem 12:   Consider the circuit in the figure, with the current…
Q: Resistor and RC Circuits Problem 11:   Consider the following circuit of three resistors (R1, R2,…
Q: The post-closing trial balance of Bendit Traders on 29 February 2016 included the following…
Q: Which one of these statements is correct regarding U.S. firms during the period 1995-2012? A. Firms…
Q: Glenn Corporation had the following list of account balances for the year ended December 31,2016.…
Q: What should the Van't Hoff Factor for acetic acid be? O3 00 O 1 O2 O Around 1.1-1.2
Q: A chemist fills a reaction vessel with 9.42 atm nitrogen monoxide (NO) gas, 0.713 atm chlorine (C12)…
Q: 9. Draw a T-Account for a bank. Also, have the bank conforming to the reserve requirement of 10% and…
Q: S (CQCL3) t σ 200 180 160 140 120 100 80 20 PPM 0 S (CDC13) 9 200 180 160 140 120 100 80 60 40 20…