当前位置:首页 > Visual Basic快速入门
Visual Basic快速入门
什么是Sub 过程同用对话框
n = Text2
Text3 = gcd(m, n)
End Sub
方法二:
Private Sub Command2_Click() '
最小公倍数
Dim m As Integer, n As Integer
m = Text1
n = Text2
Text4 = m * n / (gcd(m, n))
End Sub
Private Sub Command3_Click()
Text1.Text = \
Text2.Text = \
Text3.Text = \
Text4.Text = \
End Sub
Private Sub Command4_Click()
End
End Sub
Function gcd(m As Integer, n As Integer) '
此过程并非递归,递归解法见课本
P162
Dim k As Integer Do
k = m Mod n
m = n
n = k
Loop Until k = 0
gcd = m
End Function 3 .
冒泡排序过程;书
P107
共分享92篇相关文档