Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Finding Simple Interest And Compound Interest
Author:
Divya M
E-mail:
Click to e-mail author
Submitted:
4/9/2011
Version:
VB 2005
Compatibility:
VB 2005, VB 2008, VB 2010
Category:
Mathematics
Views:
51872
This is a simple vb.net 2005 program to find simple interest and compound interest...
Declarations:
'Create a windows application n rename it as InsertDemo... 'Place radio buttons, labels, buttons and text boxes in the form n rename it... 'Double click calculate button n write the given code below... 'Save all n execute... give values to calculate...
Code:
Public Class Form1 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 If rbSimpleInterest.Checked = True Then interest = (principal * years * rate) / 100 Else amount = principal * Math.Pow((1 + rate / 100), years) interest = amount - principal End If 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 End Class
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement