MENCARI NILAI (fx)=2X4-X2+2X-X-1, dimana X=-1
Public Class Form1
Private Sub cmdWhile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdWhile.Click
Dim fx, x As Integer
x = -1
fx = 2 * x ^ 4 + -x ^ 2 + 2 * x + -x + -1
While (fx) > 0.001
x = x + 0.001
fx = 2 * x ^ 4 + -x ^ 2 + 2 * x - x - 1
End While
ListBox1.Items.Add(fx)
End Sub
Private Sub close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdclose.Click
Dim pesan As Integer
pesan = MsgBox("Anda Yakin Keluar", vbQuestion + vbYesNo, "keluar")
If pesan = vbYes Then
MsgBox("CLOSE")
Me.Close()
End If
End Sub
Private Sub hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hapus.Click
ListBox1.Items.Clear()
End Sub
End Class
0 komentar:
Posting Komentar