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

  Write program to determine a car acceleration

Write C++ program to determine a car's acceleration written in 10 seconds

  Calculates the average of numbers

Write a C program which takes n number of element from user (where, n is specified by user), stores data in an array and calculates the average of those numbers. Output of the program should look like this;

  Skills required by personnel working in information security

What skills are required by personnel working in information security? Write down some job titles in the field and come up with some required qualifications and some desirable qualifications.

  Write an automated checkout program to expedite customers

A local department store hires you  to write an automated checkout program to expedite customers in a hurry. The  checkout line can only accept five items for any one purchase

  Create a funcion called max

Create a funcion called max().

  Quiz on c coding

Which of the following statements is incorrect

  You will implement a simplified version of the set class

you will implement a simplified version of the set class. you must implement all functions defined in the provided file

  Write a program that will convert a temperature

Write a program that will convert a temperature in Fahrenheit to its equivalent in Celsius. Show the Celsius temperature formatted to 1 decimal place.

  Virus protection program

If you encounter a Trojan Horse what has happened? You read a fake email from a bank that appears to be asking for personal information. Someone has stolen your credit card and used it to purchase items online.

  Determines the access privillege of a derived class

The base class access specifier determines the access privillege of a derived class to its base class

  A "mynum" class that will read "randfile.txt" file

A "MyNum" class that will read "randFile.txt" file and obtain the 20,000 integer numbers

  Write a fraction class whose objects will represent fraction

Write a fraction class whose objects will represent fractions. You should provide the following member functions: Two constructors, a default constructor which assigns the value 0 to the fraction, and a constructor that takes two parameters

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