VISUAL BASIC Fórmula General
Hola!!!, necesito ayuda, necesito programar la fórmula General , si alguien sabe comuniquese conmigo
x favor,
salu2
x favor,
salu2
necetito su ayuda para necesito saver como rerolver una formula general para ecuaciones
Busquen el metodo de Newton-Rapson, resuelve cualquier ecuación, busquen en internet que hay bastante.
Pero una formula "general" (con ese nombre) no existe igual me dejó en bolas cuando lei
Pero una formula "general" (con ese nombre) no existe igual me dejó en bolas cuando lei
Dim a, b, c, d, x1, x2 As Integer
Private Sub Command1_Click()
d = (b ^ 2 - 4 * a * c) ^ (1 / 2)
If (d < 0) Then
Print "Raiz Imaginaria"
If (d > 0) Then
x1 = ((-b + (b ^ 2 - 4 * a * c)) ^ (1 / 2)) / 2 * a
Text4.Text = x1
x2 = ((-b - (b ^ 2 - 4 * a * c)) ^ (1 / 2)) / 2 * a
Text5.Text = x2
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Text1_Change()
a = CInt(Text1.Text)
End Sub
Private Sub Text2_Change()
b = CInt(Text2.Text)
End Sub
Private Sub Text3_Change()
c = CInt(Text3.Text)
End Sub
Private Sub Text4_Change()
x1 = ((-b + (b ^ 2 - 4 * a * c)) ^ (1 / 2)) / 2 * a
Text4.Text = x1
End Sub
Private Sub Text5_Change()
x2 = ((-b - (b ^ 2 - 4 * a * c)) ^ (1 / 2)) / 2 * a
Text5.Text = x2
End Sub
Private Sub Command1_Click()
d = (b ^ 2 - 4 * a * c) ^ (1 / 2)
If (d < 0) Then
Print "Raiz Imaginaria"
If (d > 0) Then
x1 = ((-b + (b ^ 2 - 4 * a * c)) ^ (1 / 2)) / 2 * a
Text4.Text = x1
x2 = ((-b - (b ^ 2 - 4 * a * c)) ^ (1 / 2)) / 2 * a
Text5.Text = x2
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Text1_Change()
a = CInt(Text1.Text)
End Sub
Private Sub Text2_Change()
b = CInt(Text2.Text)
End Sub
Private Sub Text3_Change()
c = CInt(Text3.Text)
End Sub
Private Sub Text4_Change()
x1 = ((-b + (b ^ 2 - 4 * a * c)) ^ (1 / 2)) / 2 * a
Text4.Text = x1
End Sub
Private Sub Text5_Change()
x2 = ((-b - (b ^ 2 - 4 * a * c)) ^ (1 / 2)) / 2 * a
Text5.Text = x2
End Sub
Creo que esa la necesitamos todos...debe ser algo asi como la piedra filosofal ¿no?
no sean idiotas.....! la formula general es...:
menos(-)b mas(+) menos (-) la raiz de de b cuadrada (b2) menos 4 ac -todo eso sobre dos a-
menos(-)b mas(+) menos (-) la raiz de de b cuadrada (b2) menos 4 ac -todo eso sobre dos a-
