Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

26. When $1000 is deposited at 5 percent simple interest, the amount grows by $5

ID: 3622849 • Letter: 2

Question

26. When $1000 is deposited at 5 percent simple interest, the amount grows by $50 each year. When money is invested at 5 percent compound interest, then the amount at the end of each year is 1.05 times the amount at the beginning of that year. Write a program to display the amounts for 10 years for a $1000 deposit at 5 percent simple and compound interest. The first few lines displayed in the list box should appear as in Figure 6.8.
Amount
Simple Year Interest
1 $1,050.00 2 $1,100.00 3 $1,150.00
Amount Compound Interest $1,050.00 $1,102.50
$1,157.63
FIGURE 6.8
Growth of $1000 at simple and compound interest.
(An Introduction to Programming Using Visual Basic® 2008, 7th Edition. Prentice Hall/CourseSmart, 07/03/2008. 279).
<vbk:PBK9780136060734#page(279)>

Explanation / Answer

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim simple, compnd, i As Double i = 1 simple = 1000 compnd = 1000 ListBox1.Items.Add("Year" & " " & "Amt Simple int" & " " & "Amt Compund int") Do While i < 11 simple = simple + 50 compnd = compnd * 1.05 ListBox1.Items.Add(i & " " & FormatCurrency(simple) & " " & FormatCurrency(compnd)) i = i + 1 Loop End Sub
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote