Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I write this program

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am currently taking Intro to C++. Can someone help me out with this program. Please if you do, can you give me some helpful advice. Also I am a begginner so if you talk about looping, or non-begginner C++ language I will be totally clueless.

Problem: I took out a loan, with an annual interest rate of 9%. I will make 36 monthly payments of $165.25 each. I want to keep track of the remaining balance I owe after each monthly payment.

domv1978 (Visitor) Jan 25, 2002
I have started the basic C++ program. One of my assignments is to write a program to calculate and pring the balance remaining after the first, second, and third monthly payment. The balance is a formula that I am having trouble putting into a simple C++ language.

This is the formula:
bal k = pmt [1 - (1 + i) k-n]/i

bal k = is the balance remaining after the kth payment k
k = is the payment number (1, 2, 3, ...)
pmt = amount of the monthly payment
i = interest rate per month
n = total number of payments to be made

In the (bal k) the k is an exponent on the lower right hand of the bal. So in the book it shows bal, with a miniture k on the lower right hand of it.
Also the (k - n), within the formula, is an exponent of
(1 + i). How can I display the formula with the exponents beside them.
I think in the (bal k) it is suppose to display the balance and attached with a miniature (payment number) on the lower right hand of bal. I know this is probably confusing, if you do know what I am talking about, please remember I am a begginner in the application of C++. If you can, please teach me how and why you received the answer that you did. Thank you for your time.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top