Success Happy

I need help with this problem. I need to create this program for a C++ class.?

Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of $20,000, the payments would be $1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of $20,000)/12 or $166.67, would be paid in interest, and the remaining $833.33 would decrease the balance to $19,166.67. The following month the interest would be (10% of $19166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan. Finally, determine what simple annualized percentage of the original loan balance was paid in interest. For example, if $1,000 was paid in interest on a $10,000 loan and it took two years to pay off, then the annualized interest is $500, which is 5% of the $10,000 loan amount. I need help with the math part. It is too confusing to fully understand the problem. this is what i've done: #include <iosream> using namespace std; int main() { int loan, interest, payment, balance cout << "What is the loan amount?\n."; cin >> loan; cout >> "What is the interest rate?\n."; cin >> interest; last_month = recount +1 last_balance = balance + balance * monthly_interest last_interest_amount = interest_amount + (balance * monthly_interest) total_interest = last_interest/loan_amount annual_interest = (total_interest/last_month) * monthly_interest {while (balance + (balance * monthly_interest) >= payment) cout << period << "Your monthly payment is\n."; }

Public Comments

  1. There is not a single question in the body of this text. Am I to assume you want us to do your homework FOR you, or do you have specific questions? It might help if you also posted the stuff you did YOURSELF.
  2. Write it out on a piece of paper in pseudo code and design how you're going to do it. Then come back and ask a question with the code that YOU wrote if you have any problems. Nobody is going to do your homework for you, even if they do you wouldn't learn anything from it.
Powered by Yahoo! Answers