Do While i < 30
Cells(10 + i, 1) = i
Cells(10 + i, 2) = h1
Cells(10 + i, 3) = h2
Cells(10 + i, 4) = fh1
Cells(10 + i, 5) = fh2
Cells(10 + i, 6) = ht
Cells(10 + i, 7) = fht
Cells(10 + i, 8) = e
If (fht * fh1) < 0 Then
h2 = ht
Else
h1 = ht
End If
Else
Cells(11 + i, 8) = "No"
End If
If ha <> 0 Then
e = (ht - ha) / ha
Else
e = (ht - ha) / ht
End If
Cells(11 + i, 7) = e
If Abs(e) > 0.0001 Then
ha = ht
Else
Exit Do
End If
i = i + 1
Loop
End Sub
Sub fungsi(b, am, ak, h, fh)
fh = ((b + am * h) * h) ^ 5
fh = fh - ak * (b + 2 * h * (1 + Abs(am) ^ 2) ^ 0.5) ^ 2
End Sub