lunes, 14 de marzo de 2011
DESARROLLO PARCIAL "MATRIZ Y CALCULADORA"
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nom(4) As String
Dim sueldo(4) As Decimal
Dim resultado As Decimal
nom(0) = TextBox1.Text
nom(1) = TextBox2.Text
nom(2) = TextBox3.Text
nom(3) = TextBox4.Text
sueldo(0) = TextBox5.Text
sueldo(1) = TextBox6.Text
sueldo(2) = TextBox7.Text
sueldo(3) = TextBox8.Text
resultado = sueldo(0) + sueldo(1) + sueldo(2) + sueldo(3)
Label3.Text = nom(3) + " " + CStr(sueldo(3)) + vbCrLf + nom(2) + " " + CStr(sueldo(2)) + vbCrLf + nom(1) + " " + CStr(sueldo(1)) + vbCrLf + nom(0) + " " + CStr(sueldo(0)) + vbCrLf + " resultado: " + CStr(resultado)
End Sub
End Class
Public Class Form1
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim num1 As Single
Dim num2 As Single
Dim num3 As Single
Dim num4 As Single
Dim num5 As Single
Dim num6 As Single
Dim num7 As Single
Dim num8 As Single
num1 = TextBox1.Text
num2 = TextBox2.Text
num3 = TextBox3.Text
num4 = TextBox4.Text
num5 = TextBox5.Text
num6 = TextBox6.Text
num7 = TextBox7.Text
num8 = TextBox8.Text
Label1.Text = num1 + num5
Label2.Text = num2 * num6
Label3.Text = num3 - num7
Label4.Text = num4 / num8
End Sub
End Class
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario