- 博客(9)
- 收藏
- 关注
原创 选择排序法
Private Sub Command1_Click() Dim a(10) As Integer Dim i As Integer Dim j As Integer For i = 1 To 10 a(i) = Int(Rnd * 100) Print a(i); Next i Print For i = 1 To 9 For j = j + 1 To 10 If a
2016-05-07 18:16:27 188
原创 冒泡排序法
Dim a(10) As Integer Dim i As Integer Dim j As Integer For i = 1 To 10 a(i) = Int(Rnd * 100) Print a(i); Next i Print For i = 1 To 9 For j = 1 To 10 - i If a(j) swap a(j + 1), a(j) End
2016-05-07 18:15:46 203
原创 16进制
Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim s As String a = 230 b = 16 Dim yushu As Byte yushu = a Mod b s = yushu & s a = a \ b While a yushu = a Mod b If yushu
2016-05-07 18:14:44 202
原创 二进制
Private Sub Command1_Click() Print erjinzhi(230) End Sub Private Function erjinzhi(m As Byte) AsString Dim n As Byte n = m Const er As Byte = 2 Dim returnS As String Dim shang As Byte Dim yus
2016-04-28 16:51:38 287
原创 10的阶乘
Private Sub Command1_Click() Print 阶乘(10) End Sub Private Function 阶乘(n As Integer) As Long If n = 1 Then 阶乘 = 1 Else 阶乘 = n * 阶乘(n - 1) End If End Function
2016-04-14 17:05:36 386
原创 10个随机数的和
Private Sub Command1_Click() Dim i As Integer Dim a(10) As Integer Dim sum As Integer Randomize For i = 1 To 10 a(i) = Int(Rnd * 1000) + 1 sum= sum + a(i) Next i Print sum End Sub
2016-04-14 16:34:52 354
原创 随机显示15个数
Private Sub Command1_Click() Dim n As Integer Dim sierdun(15) As Integer n = 1 While n sierdun(n) = Int(Rnd * 1000) n = n + 1 Wend n = 1 While n Print sierdun(n) n = n + 1
2016-03-31 17:18:57 317
原创 15个数字的排序
Private Sub Command1_Click() Cls Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer Dim e As Integer Dim f As Integer Dim g As Integer Dim h As Integer Dim i As Integer Dim
2016-03-31 16:31:22 995
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人