1. AREA DE UN TRIANGULO:
Private sub command_click( )
Din b , h As Integer
b = val (text1)
h = val (text2)
area = (b*h) / 2
text3.text = area
End sub
Private sub command_click ( )
Text1 = “ “
Text2 = “ “
Text3 = “ “
End sub
Private sub command_click ( )
End
End sub
AREA DE UNA CIRCUNFERENCIA:
Private sub command_click ( )
Din R As Double
Din A As Double
R = Val (text1)
A = Val (text2)
Area = 3…14159265358979 * (R * R )
Text3.text =area
End sub
Private sub command2_click ( )
Din R As Double
Din A As Double
R = Val (text1)
A = Val (text2)
Longi = A * R
Text4.text = longi
End sub
Private sub command3_click ( )
End
End sub
2. SUMA DE LOS 50 )PRIMEROS NUMEROS
NATURALES:
private sub command1_click ( )
Din R As DoubleP
If (R < 50 ) then
R = val (text1)
Suma = (R *(R + 1) ) / 2
Text2.text = suma
If (R > = 51 ) then
Text3.text =”este numero no esta permitido,pero la respuesta es:
“& suma
End If
End If
End sub
Private sub command2_click ( )
Text1 = “ “
Text2 = “ “
Text3 = “ “
End sub
Private sub command_click ( )
End
End sub
REGLA DE TRES SINPLE::
Private sub command1_click ( )
Din a , b ,c As Double
a = val (text1)
b = val (text2)
c = val ( text3)
d=(c*b) /a
text4.text = d
End sub
Private sub command2_click ( )
End
End sub
3. MOSTRAR LA EDAD EN LA PANTALLLA:
Private sub command1_click( )
E nd
End sub
Private sub command2_click ( )
Din E As Double
E = val (text1)
If (E < 0) then
Text2.text = “no pudes tener esa edad”
End If
If (E > 0) then
Text2.text = “ eres un(a) niño(a)”
End If
If (E > 10) then
Text2.text = “adolescente”
End If
If (E > 18 ) then
Text2.text = “como le va joven”
End If
If (E > 30 ) then
Text2.text = “eres todo un adulto”
End If
If (E >65 ) then
Text2.text = “abuelo”
End If
If (E > 100) then
Text2.text = “no puedes seguir vivo!!!”
End If
End sub
SUMA DE LOS 100 PRIMEROS NUMEROS
Impares:
Private sub command1_click ( )
Din n As Integer
n = val ( text1)
text2.text = IIf (n < = 100, (n * n), “no se puede”
End sub