Public Class Form1
Private Function
CI(ByVal P As Single, ByVal R As Single, ByVal T As Single) As Double
CI = (P * (1 + R / 100) ^ T) - P
End Function
Private Sub
Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Button1.Click
Dim
CompInt As Single
Dim
Prin As Single
Dim
Rate As Single
Dim
Time As Single
Prin = TextBox1.Text
Rate = TextBox2.Text
Time = TextBox3.Text
CompInt = CI(Prin, Rate, Time)
TextBox4.Text = Format(CompInt, "$#,##0.00")
End Sub
End Class
No comments:
Post a Comment
Note: only a member of this blog may post a comment.