Originally posted by: SithSolo1
grrr, thats the one I use but my application isn't working correctly. It spits out $3,221.02 at the end of 5 years instead of $12,210.20 which I think is the correct answer.
'Declare variables and constants
Const decRATE As Decimal = 0.1D
Dim intYears As Integer
Dim decAnnualDeposit, decAmount As Decimal
'Calculate and display the account value at the end of each term
decAnnualDeposit = Convert.ToDecimal(Me.txtAnnualDeposit.Text)
For intYears = 5 To 30 Step 5
decAmount = Convert.ToDecimal(decAnnualDeposit * ((1 + decRATE) ^ intYears))
Me.lblValue.Text = Me.lblValue.Text & "At the end of " & intYears.ToString & " years: " & _
decAmount.ToString("C2") & ControlChars.NewLine
Next intYears
Edit:
Originally posted by: KMc
That's only if he never deposits any more money. He is asking what happens if he keeps putting in $2,000 each year on top of that.
Yes, that is what I am after