this program compares interest rates between two


'This program compares interest rates between two banks and determines the best bank

PublicClassForm1

PrivateSub Button1_Click(sender AsSystem.Object, e AsSystem.EventArgs) Handles Button1.Click

'Declarations

Dim annualInterest1, annualInterest2, annualInterestAPY1, numberCompoundedPeriods1, annualInterestAPY2, numberCompoundedPeriods2 AsDouble

'Input

        annualInterest1 = CDbl(TextBox1.Text)

        annualInterest2 = CDbl(TextBox4.Text)

        numberCompoundedPeriods1 = CDbl(TextBox2.Text)

        numberCompoundedPeriods2 = CDbl(TextBox5.Text)

'Processing

        annualInterestAPY1 = (1 + ((annualInterest1 / 100) / (numberCompoundedPeriods1)) ^ numberCompoundedPeriods1 - 1)

        annualInterestAPY2 = (1 + ((annualInterest2 / 100) / (numberCompoundedPeriods2)) ^ numberCompoundedPeriods2 - 1)

'Output

        TextBox3.Text = CStr(annualInterestAPY1 * 100)

        TextBox6.Text = CStr(annualInterestAPY2 * 100)

EndSub

EndClass

Request for Solution File

Ask an Expert for Answer!!
Visual Basic Programming: this program compares interest rates between two
Reference No:- TGS0218166

Expected delivery within 24 Hours