Visual Basic Consider an account in which $1000 is deposited upon opening the ac
ID: 3798852 • Letter: V
Question
Visual Basic Consider an account in which $1000 is deposited upon opening the account and an additional $1000 is deposited at the end of each year. If the money earns interest at the rate of 5 percent, how long will it take before the account contains at least $1 million? Visual Basic Consider an account in which $1000 is deposited upon opening the account and an additional $1000 is deposited at the end of each year. If the money earns interest at the rate of 5 percent, how long will it take before the account contains at least $1 million? Visual BasicExplanation / Answer
Class Program
Shared Sub Main(ByVal args() As String)
Dim amount As Long = 1000
Dim time As Integer = 0
While amount < 1000000
amount = amount + ((amount * 5) / 100)
amount = amount + 1000
time = time + 1
End While
Console.WriteLine(time)
Console.ReadLine()
End Sub
End Class
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.