Ensayo de ivestigacion

Solo disponible en BuenasTareas
  • Páginas : 2 (307 palabras )
  • Descarga(s) : 0
  • Publicado : 30 de agosto de 2010
Leer documento completo
Vista previa del texto
Public Class Form1
Private Sub btnSalir_Click
Me.Close()
End Sub
Private Sub btnMenor_Click
Dim n1, n2, n3, n4 As Decimal
n1 = Val(txtN1.Text)
n2 =Val(txtN2.Text)
n3 = Val(txtN3.Text)
n4 = Val(txtN4.Text)
Dim menor As Decimal = n1
If n2 < menor Then
menor = n2
End If
If n3 < menorThen
menor = n3
End If
If n4 < menor Then
menor = n4
End If
txtMenor.Text = menor
End Sub
Private Sub btnLimpiar_ClicktxtN1.Clear()
txtN2.Clear()
txtN3.Clear()
txtN4.Clear()
txtPro.Clear()
txtMenor.Clear()
txtPro2.Clear()
txtMayor.Clear()txtObs.Clear()
End Sub
Private Sub btnPro_Click
If Val(txtMenor.Text) > 0 Then
Dim pro As Integer = 0
pro = ((Val(txtN1.Text) + Val(txtN2.Text) +Val(txtN3.Text) + Val(txtN4.Text)) - Val(txtMenor.Text)) / 3
txtPro.Text = pro
Else
MsgBox("Primero Calcular la Nota Menor")
End If
End Sub
Private SubbtnMayor_Click
Dim n1, n2, n3, n4 As Decimal
n1 = Val(txtN1.Text)
n2 = Val(txtN2.Text)
n3 = Val(txtN3.Text)
n4 = Val(txtN4.Text)
Dim mayor AsDecimal = n1
If n2 > mayor Then
mayor = n2
End If
If n3 > mayor Then
mayor = n3
End If
If n4 > mayor Then
mayor= n4
End If
txtMayor.Text = mayor
End Sub
Private Sub btnPro2_Click
If Val(txtMayor.Text) > 0 Then
Dim pro2 As Integer = 0
pro2 =((Val(txtN1.Text) + Val(txtN2.Text) + Val(txtN3.Text) + Val(txtN4.Text)) + Val(txtMayor.Text)) / 5
txtPro2.Text = pro2
Else
MsgBox("Primero Calcular la Nota Mayor")...
tracking img