Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need only part 2 in c++ In this assignment, you are to write a program that will compute a monthly payment. This assignment is

i need only part 2 in c++

image text in transcribedimage text in transcribed

In this assignment, you are to write a program that will compute a monthly payment. This assignment is broken up into 2 parts. You are to have at least, 1 function (other than main() in both programs. The function() must be referenced by the main program Part 1 The formula for computing the monthly payment for a long term loan is shown below. Pomir Payment = 1 + mir P Principal mir interest rate for 1 month y number of years The input to the program (from the keyboard) is the Principal (P-7e8ee), the yearly interest rate (yir=9.5) and the number of years (y=38). The output is a line exactly like the following: Principal 70898.ee Interest Rate 9.5890 Years 30.0 Payment 588.68 break it up into parts, To solve this problem you can (if you want to then compute each part. The following table shows the calculations that have to be performed, along with values for a $70, eee loan at 9.5% over 30 years. You can use these numbers to check your program. yir mir ---- 1289 1.007916 a = 1 + mir 1.007916 992145514 C = 12 y 560 058497109 e = 1.0 94150289 554.12 fp.ir payment - 588.60 Part 2 You are to generate and print the first 8 rows and the last 8 rows of a complete amortization table, very similar to the one shown below (including the dashes). You are to have and reference), at least, i function (other than main) in your program. Sample output: | Principal 78882.ee Interest Rate 9.5e8e Years 30. Payment 588.68 Month Pay Total Paid Monthly Interest Principal Paid Total Principal Paid Remaining Balance 1 2 3 588.68 588.68 588.68 588.60 588.68 588.68 588.68 588.68 588.62 1177.20 1765.79 2354.39 2942.99 3531.59 4120.19 4788.78 554.17 553.89 553.62 553.34 553.86 552.78 552.52 552.21 34.43 34.70 34.98 35.26 35.53 35.82 36.18 36.39 34.43 69.14 184.11 139.37 174.90 210.72 246.82 283, 2e 69965.57 69930.86 69895.89 69860.63 69825. le 69789.28 69753.18 69716.se 5 6 7 8 353588.60 354 588.68 355 588.68 356 588.60 357 588.60 358 588.68 359588.68 360 588.60 207775.07 288363.67 268952.27 209540.87 218129.47 210718.06 211386.66 211895.26 35.98 31.61 27.29 22.76 18.28 13.76 9.21 4.62 552.61 66897.25 556.99 66564.24 561.49 67125.64 565.84 67691.48 579.32 68261.80 574.84 68836.64 579.3969416.93 583.97 79299.99 3992.75 3435.76 2874.36 2 308.52 1738.20 1163.36 583.97 e.ee Notes: Generate the table so that you would get valid output for a 30 year loan or a 5 year loan. Formatting in C++ is rather involved. You want to make sure that the periods (in the numbers) line up. Before you start printing, you should specify the number of decimal places to be printed. You should also specify that the numbers should be printed in fixed format. You only have to do this once. cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899