Senin, 14 Oktober 2013

Program Pencarian Simpangan Baku dengan Microsoft Visual Basic 6.0

Desain form

Source Code
Private Sub Cmdhitung_Click()
Dim i, n, jum, jumkuadrat, simpanganbaku, rata As Double
For i = 0 To List1.ListCount - 1
jum = jum + Val(List1.List(i))
jumkuadrat = jumkuadrat + (List1.List(i)) ^ 2
n = n + 1
Next i
rata = jum / n
simpanganbaku = Sqr(((n * jumkuadrat) - (jum ^ 2)) / (n * (n - 1)))
lbljumlah.Caption = jum
lblrata.Caption = rata
lblsb.Caption = simpanganbaku
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdulang_Click()
List1.SetFocus
List1.Clear
lbljumlah.Caption = ""
lblrata.Caption = ""
lblsb.Caption = ""
End Sub

Private Sub Txt1_keypress(keyascii As Integer)
Dim a As Integer
a = Val(Txt1.Text)
If keyascii = 13 Then
List1.AddItem a
Txt1.Text = ""
End If
End Sub

Silahkan download programnya disini

0 komentar:

Posting Komentar

You can replace this text by going to "Layout" and then "Page Elements" section. Edit " About "

Baca Selengkapnya Di : http://indonesianblog-jmk.blogspot.com/2012/06/cara-membuat-komentar-admin-berbeda.html#ixzz2kb6khEJE