Did you have a question? You didn't ask one.
From what you've posted, your program won't do what the instructions say.
1 2
|
int i = annualInterestRate;
for (i = 5; i <= 8; i += 0.125)
|
Why are you setting i in the first statement, then overwriting in the next statement?
The for loop won't do what you want. i is an int. You can't add 0.125 to an int. Well, you can, but the result doesn't change since the value is truncated to 0.
|
for(j = numberOfYears; j <= numberOfYears;j++)
|
This loop will execute eactly once. Is that what you want?
|
for(x = numberOfYears; x < totalPayment; x++ )
|
Does x represent years or payments? You're mixing the two.
totalPayment is uninitialized.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
http://v2.cplusplus.com/articles/jEywvCM9/
It makes it easier to read your code and it also makes it easier to respond to your post.
Hint: You can edit your previous post, highlight your code and press the <> formatting button.