PLEASE RUN THE FOLLOWING FULL PROGRAM IN VB 5 AND CORRECT IT.
Private Sub Command1_Click()
Dim x, y, z, w, v, a, b As Double
MsgBox "This program will find the real solutions of the equation x^4+ax+b=0"
MsgBox "give a"
InputBox a
MsgBox "give b"
InputBox b
If a = 0 Or b = 0 Then
MsgBox "The solutions can not be given by that program!"
Else
MsgBox "ok please wait...."
End If
If a ^ 4 - (256 * b ^ 3) / 27 >= 0 Then
z = ((a ^ 2 + (a ^ 4 - (256 * b ^ 3) / 27) ^ 1 / 2) / 2) ^ 1 / 3 + ((a ^ 2 - (a ^ 4 - (256 * b ^ 3) / 27) ^ 1 / 2) / 2) ^ 1 / 3
Else
MsgBox "The solutions can not be given by that program!"
End If
If z >= 0 And -z - (2 * a) / z ^ 1 / 2 >= 0 Then
x = (z ^ 1 / 2 + (-z - (2 * a) / z ^ 1 / 2) ^ 1 / 2) / 2
w = (z ^ 1 / 2 - (-z - (2 * a) / z ^ 1 / 2) ^ 1 / 2) / 2
Else
If z >= 0 And -z + (2 * a) / z ^ 1 / 2 >= 0 Then
y = (z ^ 1 / 2 + (-z + (2 * a) / z ^ 1 / 2) ^ 1 / 2) / 2
v = (z ^ 1 / 2 - (-z + (2 * a) / z ^ 1 / 2) ^ 1 / 2) / 2
Else
If z < 0 Then
MsgBox "There are no other real solutions"
End If
End If
End If
MsgBox "The first solution is" 'x'
MsgBox "The second solution is" 'w'
MsgBox "The third solution is" 'y'
MsgBox "The fourth solution is" 'v'
MsgBox "There is no other real solution"
MsgBox "Thanks for using that program"
End Sub
THANKS