Minggu, 27 Juni 2010

MENCARI BILANGAN FACTORIAL

Private Sub Command1_Click()
tangka.Text = ""
thasil.Text = ""
tangka.SetFocus
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
vbil = Val(tangka.Text)
vproses = 1
For i = 1 To vbil
vproses = i * vproses
Next i

thasil.Text = vproses

End Sub

Private Sub tangka_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command3.SetFocus
End If
End Sub

Tidak ada komentar:

Posting Komentar