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

  The second argument to the function is the string

The function fnUserBinaryInputX has 2 input arguments, each is a string. The first string is the "prompt" string displayed to the user when asked to enter a string. The second argument to the function is the string to compare the user entered stri..

  Using opengl to create a cube

Write a program in C/C++ using OpenGL to create (without using built in function) a cube by implementing translation algorithm by translating along 1. X-axis, 2.Y-axis and 3. X and Y plane

  Write a program that will store 10 integers into an array

Write a program that will store 10 integers into an array. Only accept integers between -100 and 100. Display those integers. You must then square those integers by CALLING A FUNCTION to square each individual integer. That function must be called, s..

  Write c function to sort one dimensional integer array

Consider the values sorted in the array. Sort it in ascending order using Bubble sort technique showing all iterations: write C function to sort one dimensional integer array in ascending order.

  An evaluation of blogger

*An evaluation of Blogger*Identify and discuss the online blogs you examined and their usefulness Discuss the place blogging holds in today's availability of information,*and its advantages/disadvantages over more traditional formats such as newspape..

  Implement a function called findmax

Implement a function called findMax that finds the maximum value in a 2¬dimensional array.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Problems on oops

Problems on OOPS

  Write a function base

Write a function base(b,x) that computes the representation of x in an arbitrary base b.

  Write a function named sort3

Write a function named "sort3" that takes three floating point arguments, call them "x" , "y" , and "z" , and modifies their values, if necessary, in such a way as to make true the following inequalities: x y z .

  Card poker game develop a simple poker game complete with

card poker game develop a simple poker game complete with basic ai using the object oriented programming principles

  Write an application that reads the user''s weight

Write an application (BMICalc) that reads the user's weight in poinds and height in inches, then calculates the Body Mass Index.

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