Calculate monthly payment and amortization schedule for loan

Assignment Help C/C++ Programming
Reference no: EM13852132

Write a C program for the following problems. Be sure that your program follows the requirements described on the Style Requirements document found on Pilot.

Explanation of the problem:

Write a C program that calculates the monthly payment and amortization schedule for the loan. The program should prompt the user to enter the loan amount, the annual interest rate, and the number of years the loan will run. Use the formula below to calculate the monthly payment. Note that the user input for interest rate and term will be in years, but you will need monthly interest rate and term in months for this formula.

where P is the principal (loan amount), r is the monthly interest rate, and n is the number of months

Output: Display all information as shown on the sample program runs that follow. This includes the loan information (initial loan amount, annual interest rate, monthly interest rate, term of loan in years, term of loan in months, and monthly payment amount). Then display the amortization table and the total interest paid over the life of the loan.

The amortization table displays the loan balance at the beginning of each month, the monthly payment, the interest for the month (beginning monthly balance * monthly interest rate), the principal payment (loan balance - interest), and the new balance (beginning balance - principal payment). There should be an output line for each month over the life of the loan. So if a loan is for 5 years, there would be 60 lines of output.

Be sure to use functions for all main tasks. At a minimum, you need a function to calculate the monthly payment and a function to print the amortization table. You also need a function to calculate the monthly interest due; call this function from the function that prints the amortization table.

Be sure to use a validation loop for all input values (a separate loop for each). The principal and loan term (number of years) should be greater than 0. The annual interest rate should be between 0 and 30.

Note that the final payment on the loan may need to be adjusted to prevent a negative balance. Be sure to make this adjustment, if necessary, so that the final loan balance is 0.

Display all currency with two places to the right of the decimal; display all interest rate values with three places to the right of the decimal.

Once your program is working, add code so that the user is asked if he/she wants to run it again with new inputs. Repeat the processing steps until the user no longer wants to continue.

Reference no: EM13852132

Questions Cloud

Injections of human chorionic gonadotropin : It is possible that injections of human chorionic gonadotropin (hcg) might sustain Frank's sperm production.  However, if he continues the hcg injections for a long period of time, he could also increase the amount of what hormone?
A eukaryotic structural gene contains two introns : A eukaryotic structural gene contains two introns and three exons: exon 1-intron 1-exon 2-intron 2-exon 3. The 5? splice site at the boundary between exon 2 and intron 2 has been eliminated by a small deletion in the gene. Describe how the pre-mRNA e..
Ability to manage patient expectations : What implications does the concept of grudge purchase have on the patient experience and our ability to manage patient expectations
Primary keys and indexes : Primary Keys and Indexes
Calculate monthly payment and amortization schedule for loan : Write a C program that calculates the monthly payment and amortization schedule for the loan. The program should prompt the user to enter the loan amount, the annual interest rate, and the number of years the loan will run.
Chamber between parallel plates : 1. The ancient Greek Democritus and his teacher Leucippus reasoned that matter must have a smallest component that was indivisible. Suppose you take one kilogram of gold and begin the process of dividing the material into successive halves.
Find out the internal schema of the above database : Find out the internal schema of the above database
What are the four types of portfolios a pmo must focus on : What are the four types of portfolios a PMO must focus on?
Should the facility make this investment : A proposed $2.5 million dollar investment at a 70 MGY (million gallons a year) facility will save the facility $800 k/ yr in energy costs. Assuming an interest rate of 5%/ yr, and equipment expected life of 10 years. Should the facility make this inv..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd