Im new at this i know im doing something wrong. This is my project
$15000 is deposited into a savings paying 5 % interest and $1000 is withdrawn at
the end of each year. How many years will it take for the account to be depleted.
Note if at the end of a certain year the balance is $1000 or less, then the final
withdrawl will consist of that balance and the account will be depleted.
this is the code i have but something is not write can anyone help PLS
Private Sub btnYears_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnYears.Click
Dim Deposite = 15000
Dim Interest = 0.05
Dim Subtract = 1000
Dim Years = 1
Do While Deposite <= 15000
Deposite = (Deposite * Interest) + Subtract
Years += 1
Loop
txtYears.Text = " The number of years to deplete 15000 = " & Years
End Sub
$15000 is deposited into a savings paying 5 % interest and $1000 is withdrawn at
the end of each year. How many years will it take for the account to be depleted.
Note if at the end of a certain year the balance is $1000 or less, then the final
withdrawl will consist of that balance and the account will be depleted.
this is the code i have but something is not write can anyone help PLS
Private Sub btnYears_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnYears.Click
Dim Deposite = 15000
Dim Interest = 0.05
Dim Subtract = 1000
Dim Years = 1
Do While Deposite <= 15000
Deposite = (Deposite * Interest) + Subtract
Years += 1
Loop
txtYears.Text = " The number of years to deplete 15000 = " & Years
End Sub