calculate the periodic payments and the unpaid balance after certain payments.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 28PE
icon
Related questions
Question

C++ code please

Write a program that prompts the user to input the values of L, r, m, t, and k. The program then outputs the appropriate values. Your program must contain at least two functions, with appropriate parameters, to calculate the periodic payments and the unpaid balance after certain payments. Make the program menu driven and use a loop so that the user can repeat the program for different values.

Example of expected output:

Enter (Y/y) to find the periodic payment and unpaid balance after certain payments: y Enter the loan amount: 20000 Enter the interest rate per year as a percentage: 2.75 Enter the number of payments per year: 12 Enter the number of years for the loan: 30 The periodic payment is: 81.65 Enter the number of payments made: 20 The unpaid balance after 20 payment(s) is : 19267.89 Enter (Y/y) to find the periodic payment and unpaid balance after certain payments: n

Format your output with setprecision(2) to ensure the proper number of decimals for testing!

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Mathematical functions
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr