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

Write a compound interest calculator. The compound interest formula is: Where: P

ID: 3772356 • Letter: W

Question

Write a compound interest calculator. The compound interest formula is:

Where:

P = principal amount (the initial amount you borrow or deposit)

r = annual rate of interest (as a decimal)

t = number of years the amount is deposited or borrowed for.

A = amount of money accumulated after n years, including interest.

n  = number of times the interest is compounded per year

Here is a link to a site that explains how compound interest is calculated:

http://ncalculators.com/interest/compound-interest-calculator.htm

Specifications:

Explanation / Answer

  Private Sub btnCalculate_Click(ByVal sender As

System.Object, ByVal e As System.EventArgs) Handles

btnCalculate.Click

        Dim principal, years As Integer

        Dim rate, interest, amount As Single

        principal = txtPrincipal.Text

        years = txtYears.Text

        rate = txtRate.Text

            amount = principal * Math.Pow((1 + rate / 100), years)

            interest = amount - principal

       

        txtInterest.Text = interest

    End Sub

    Private Sub btnClear_Click(ByVal sender As

System.Object, ByVal e As System.EventArgs) Handles

btnClear.Click

        txtPrincipal.Text = " "

        txtYears.Text = " "

        txtRate.Text = " "

        txtInterest.Text = " "

    End Sub

    Private Sub btnExit_Click(ByVal sender As System.Object,

ByVal e As System.EventArgs) Handles btnExit.Click

        End

    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