Académique Documents
Professionnel Documents
Culture Documents
Dim b As Double
Dim h As Double
Dim area As Double
b = Val(Txtbase.Text)
h = Val(Txtaltura.Text)
area = (b * h / 2)
MsgBox ("el area es :" & area)
End Sub
.
Private Sub Command1_Click()
Dim a, b As Integer
Dim s As Integer
Dim r As Integer
Dim m As Integer
Dim c As Double
a = InputBox("ingrese el primer numero")
b = InputBox("ingrese el segundo numero")
s=a+b
MsgBox ("la suma es:" & s)
r=a-b
MsgBox ("la resta es:" & r)
m=a*b
MsgBox ("la multiplicacion es:" & m)
c=a/b
MsgBox ("el cociente es:" & c)
End Sub
.
a = InputBox("ingrese numero")
b = InputBox("ingrese numero")
s=a+b
MsgBox ("la suma...." & s)
End Sub
..
a = InputBox("ingrese num")
b = InputBox("ingerese num")
c=a/b
MsgBox ("la division normal es:" & c)
p = a Mod b
MsgBox ("el residuo es:" & p)
r=a\b
MsgBox ("la divisuion entera es :" & r)
End Sub
Private Sub Command2_Click()
End
End Sub
..
End If
End If
End Sub
End If
End If
End Sub
..
rivate Sub Command1_Click()
Dim nota As Double
nota = InputBox("ingresar nota entre 0-10")
Txtsalida.Text = ""
If nota < 5 Then
Txtsalida.Text = "reprobado"
Else
If nota >= 5 And nota < 7 Then
Txtsalida.Text = "aprobado"
Else
If nota >= 7 And nota < 9 Then
Txtsalida.Text = "notable"
Else
If nota >= 9 And nota < 10 Then
Txtsalida.Text = "sobresaliente "
Else
Txtsalida.Text = "excelente"
End If
End If
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command1_Click()
Dim n As Integer
n = InputBox("ingrese dia de semana")
If n = 1 Then
MsgBox ("el dia es lunes")
Else
If n = 2 Then
MsgBox ("el dia es martes")
Else
If n = 3 Then
MsgBox ("el dia es miercoles")
Else
If n = 4 Then
MsgBox ("el dia es jueves")
Else
If n = 5 Then
MsgBox ("el dia es viernes")
Else
If n = 6 Then
MsgBox ("el dia es sabado")
Else
If n = 7 Then
MsgBox ("el dia es domingo")
Else
MsgBox ("no pertece al dia semana")
End If
End If
End If
End If
End If
End If
End If
End Sub
..
End Sub
Private Sub Command1_Click()
Dim n1 As Integer
Dim n2 As Integer
Dim n3 As Integer
n1 = InputBox("ingrese el primer numero")
n2 = InputBox("ingrese el segundo numero")
n3 = InputBox("ingrese el tercer numero")
If (n1 > n2 And n1 > n3) Then
may = n1
Else
If (n2 > n1 And n2 > n3) Then
may = n2
Else
may = n3
End If
End If
MsgBox ("el numero mayor es;" & may)
End Sub
..
Else
MsgBox ("error")
End If
End Sub
n = InputBox("ingrese numero")
While n > 0
d = n Mod 10
List1.AddItem d
n = n \ 10
Wend
End Sub
End If
Else
MsgBox ("no correswponde")
End If
End Sub
End Sub
..
..