Progarmas

Páginas: 2 (395 palabras) Publicado: 4 de enero de 2012
CALCULO DEL NUMERO MAYOR
-------------------------------------------------
Private Sub btCalcular_Click()
-------------------------------------------------
Dim a As Integer-------------------------------------------------
Dim b As Integer
-------------------------------------------------
Dim suma As Integer
-------------------------------------------------
Dim resta As Integer-------------------------------------------------

-------------------------------------------------
If Text1.Text = "" Then
-------------------------------------------------
MsgBox "Por favorIntroduzca Valor de A"
-------------------------------------------------
End If
-------------------------------------------------
If Text2.Text = "" Then-------------------------------------------------
MsgBox "Por favor Introduzca Valor de B"
-------------------------------------------------
Else
--------------------------------------------------------------------------------------------------
a = Val(Text1.Text)
-------------------------------------------------
b = Val(Text2.Text)
-------------------------------------------------
suma = (a ^ 2) + (b ^ 2)-------------------------------------------------
resta = (a ^ 2) - (b ^ 2)
-------------------------------------------------

-------------------------------------------------
If a > b Then-------------------------------------------------
MsgBox "El numero mayor es : " & a & vbCrLf & "La sumatoria de las potencias de " & a & " son: " & suma & vbCrLf& "La diferencia de las potencias de " & a & " son: " & resta
-------------------------------------------------
End If
--------------------------------------------------------------------------------------------------
End If
-------------------------------------------------

-------------------------------------------------
End Sub

CALCULO DEL NUMERO MAYOR...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Progarma Murcia
  • Progarma nacional de salud
  • FICHAS DE EVALUACION Y PROGARMA 1
  • Relatoria progarma de salud ocupacional
  • Progarma De Salud Ocupacional
  • progarma informatico AutoCAD
  • controladores logicos progarmables

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS