Public Class Tabel_Sinus
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
For i = 0 To 360
If i = 90 Or i = 270 Then
Me.ListBox1.Items.Add(vbTab & i & vbTab & vbTab & Format(Math.Sin(i * Math.PI / 180), "0.0000") & vbTab & vbTab & Format(Math.Cos(i * Math.PI / 180), "0.0000") & vbTab & vbTab & Format(" ~"))
Else
Me.ListBox1.Items.Add(vbTab & i & vbTab & vbTab & Format(Math.Sin(i * Math.PI / 180), "0.0000") & vbTab & vbTab & Format(Math.Cos(i * Math.PI / 180), "0.0000") & vbTab & vbTab & Format(Math.Tan(i * Math.PI / 180), "0.0000"))
End If
Next
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.ListBox1.Items.Clear()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
End Class
Tidak ada komentar:
Posting Komentar
Berkomentarlah yang baik..