SCREEN SHOT PROGRAM HASIL PERSEKUTUAN TERBESAR
Syntax pada tampilan tersebut
Dim a, b As
Integer
Function
faktor(n, m As Integer)
If n > m
Then
z = n
Else
z = m
End If
Do
a = a + 1
x = n Mod a
y = m Mod a
If x = 0
Then Text3.Text = Text3.Text & "[" & a & "]"
If y = 0
Then Text4.Text = Text4.Text & "[" & a & "]"
If x = 0 And
y = 0 Then Text5.Text = a
Loop Until a
= z
End Function
NB : husus syntax ini double click pada tempat yang kosong, dan ketikkan syntax tersebut pada tempat yang kosong pada cooding program
Private Sub
cmdproses_Click()
a = 0
Call
faktor(Val(Text1.Text), Val(Text2.Text))
Text6 =
Val(Text1.Text) / Val(Text2.Text)
Text7.Text =
Val(Text1.Text) Mod Val(Text2.Text)
End Sub
Private Sub
cmdulang_Click()
Text1.Text =
""
Text2.Text =
""
Text3.Text =
""
Text4.Text =
""
Text5.Text =
""
Text6.Text =
""
Text7.Text =
""
Text1.SetFocus
End Sub
Private Sub cmdkeluar_Click()
pesan =
MsgBox("Anda Yakin Ingin Keluar?", vbYesNo, "KELUAR")
If pesan =
vbYes Then
End
End If
End Sub
Tidak ada komentar:
Posting Komentar