Compute the
Sub
total
(
Beginning Balance + Deposits

Withdrawals)
d.
Compute the Interest Earned. If the Subtotal is greater than 5000.00
the interest rate is 2 percent otherwise 1 percent.
e.
Compute
Endin
g Balance (Sub Total + Interest EarneD)
Display the
Interest Earned and Ending Balance
in label
s
and format
them
as currency
Answer:

    decSubTotal = (decBalance + decDeposits - decWithdrawls)
    If decSubTotal > 500.0 Then
        decearned = 0.02
    End If

    decending = (decSubTotal + decearned)

    lblInterest.Text = decearned.ToString("C")
    lblEnding.Text = decending.ToString("C")
End Sub

Recommended Answers

All 5 Replies

decearned doesn't get set to .01 if decSubTotal is less than or equal to 500.

Your assignment says the interest rate changes at 5000 not 500.

The final total should be decsubtotal + (decsubtotal * decearned)

The interest earned would be decsubtotal * decearned

decSubTotal = (decBalance + decDeposits - decWithdrawls)

        If decSubTotal > 5000.00 Then


        decearned = 0.02
    End If

    decSubTotal +(decSubTotal * decearned)
    decsubtotal * decearned

    lblInterest.Text = decearned.ToString("C")
    lblEnding.Text = decending.ToString("C")

I am done but there I have mistakes

LOL :) That's like saying "I am done building the car but the engine is not in it yet"

I am done and I got closed to my answer but there might be a mistake

  decSubTotal = (decBalance + decDeposits - decWithdrawls)
    If decSubTotal > 5000 Then
        decearned = 0.02
    End If

    decending = decSubTotal + (decSubTotal * decearned)
    decearned = decSubTotal * decearned

    lblInterest.Text = decearned.ToString("C")
    lblEnding.Text = decending.ToString("C")

A little rough but it should work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.