I
isaac2004
hello to all. i am in a Introductory C++ class and I have been having
some issue with an assignment that i was given. Here is a brief setup
for it.
Write a program to print out a loan repayment schedule. The input is
the loan amount, the annual percentage rate and the monthly payments.
If the monthly payment will not pay off the loan, print an error
message and quit.For each payment, it is first is used to pay the
month's interest on the outstanding debt. This would be 1/12 of the
yearly interest at the annual percentage rate. After the interest is
paid, the remaining payment is applied to the debt, reducing the
outstanding debt. The last month many not need a full payment. After
printing the schedule, print a summary of the loan. This should
include the initial loan amount, the rate, the monthly payment, the
number of payments, total interest paid and total paid.
A possible out put can be the following for input of 100, 60, 20
month principle interest
--------------------------
1 100.00 5.00
2 85.00 4.25
3 69.25 3.46
4 52.71 2.63
5 35.34 1.76
6 17.10 .85
Principle: $100
Rate: 60%
5 payments of $20, last payment of 17.95
Total interest paid: $17.95
Total repaied: $117.95
I have been wrestling with this for a couple of days on how to do
this. The initial input is easy but its the actual algorithm of the
computing and storing that I am having an issue with, that is could i
store each individual payment into an array of records or something
like that. I know the loop must be set up like.
while (principle >0) { do stuff }
its the do stuff that I am getting stuck on. Can I have any ideas for
how to do this.
NO CODE PLEASE!!! I would like to learn this for myself. Thank you
before hand.
some issue with an assignment that i was given. Here is a brief setup
for it.
Write a program to print out a loan repayment schedule. The input is
the loan amount, the annual percentage rate and the monthly payments.
If the monthly payment will not pay off the loan, print an error
message and quit.For each payment, it is first is used to pay the
month's interest on the outstanding debt. This would be 1/12 of the
yearly interest at the annual percentage rate. After the interest is
paid, the remaining payment is applied to the debt, reducing the
outstanding debt. The last month many not need a full payment. After
printing the schedule, print a summary of the loan. This should
include the initial loan amount, the rate, the monthly payment, the
number of payments, total interest paid and total paid.
A possible out put can be the following for input of 100, 60, 20
month principle interest
--------------------------
1 100.00 5.00
2 85.00 4.25
3 69.25 3.46
4 52.71 2.63
5 35.34 1.76
6 17.10 .85
Principle: $100
Rate: 60%
5 payments of $20, last payment of 17.95
Total interest paid: $17.95
Total repaied: $117.95
I have been wrestling with this for a couple of days on how to do
this. The initial input is easy but its the actual algorithm of the
computing and storing that I am having an issue with, that is could i
store each individual payment into an array of records or something
like that. I know the loop must be set up like.
while (principle >0) { do stuff }
its the do stuff that I am getting stuck on. Can I have any ideas for
how to do this.
NO CODE PLEASE!!! I would like to learn this for myself. Thank you
before hand.