Matemáticas, pregunta formulada por juanpablo406p8gruj, hace 1 año

Realizar un programa en vba que te calcule el volumen de un cilindro

Respuestas a la pregunta

Contestado por ramonmlp9yhf3
1

Dim num1, num2, resp As Double

Const pi As Double = 3.1416

Private Sub Command1_Click()

resp = 2 * pi * num1 * (num1 * num2)

Text3.Text = resp

End Sub

Private Sub Command2_Click()

resp = pi * num1 * num1 * num2

Text4.Text = resp

End Sub

Private Sub Command3_Click()

Text1.Text = " "

Text2.Text = " "

Text3.Text = " "

Text4.Text = " "

Text1.SetFocus

End Sub

Private Sub Command4_Click()

End

End Sub

Private Sub Text1_Change()

If Text1.Text <> " " Then

num1 = Val(Text1.Text)

End If

End Sub

Private Sub Text2_Change()

If Text2.Text <> " " Then

num2 = Val(Text2.Text)

End If

End Sub

Otras preguntas