Advertisement
idsystems

VBNet_AC08

Sep 24th, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.81 KB | None | 0 0
  1. Public Class Form1
  2. // Actividad 08 - Interes Compuesto
  3.     Dim capital As Decimal
  4.     Dim interesmensual As Single
  5.     Dim cuotas As Long
  6.  
  7.    
  8.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  9.         capital = TextBox1.Text
  10.         interesmensual = TextBox2.Text
  11.         cuotas = TextBox3.Text
  12.         Label4.Text = InteresCompuesto(capital, interesmensual, cuotas)
  13.  
  14.     End Sub
  15.  
  16.     Function InteresCompuesto(ByVal capitas As Integer, ByVal interesmensual As Single, ByVal cuotas As Long) As Integer
  17.         Dim i As Long
  18.         Dim total As Integer
  19.         total = capital
  20.         For i = 1 To cuotas
  21.             total = total + (total * interesmensual)
  22.         Next
  23.         InteresCompuesto = total - capital
  24.     End Function
  25. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement