- 博客(11)
- 收藏
- 关注
原创 冒泡排序法
Private Sub Command1_Click()Me.FontSize = 30Dim a(10) As IntegerDim i As IntegerFor i = 1 To 10a(i) = 10 + Int(Rnd() * 100) Print a(i); Next iPrintDim p As StringDim j As Int
2016-05-07 17:54:13
150
原创 选择排序
Private Sub Command1_Click()Me.FontSize = 20Dim a(10) As IntegerDim i As IntegerFor i = 1 To 10 a(i) = 10 + Int(Rnd() * 100) Print a(i);Next iPrintDim j As IntegerFor j = 1
2016-05-07 17:33:43
179
原创 10进制转换为16进制
Private Sub Command1_Click()Me.FontSize = 40Dim a As IntegerDim b As IntegerDim s As StringDim yushu As Bytea = 1230b = 16While a yushu = a Mod b If yushu s = yushu &
2016-05-07 17:11:40
295
原创 将一个数改为16进制
Private Sub Command1_Click()Me.FontSize = 24Print shiliujinzhi(23)End SubPrivate Function shiliujinzhi(m As Byte) As StringDim n As Byten = mConst shiliu As Byte = 16Dim shang As Byt
2016-04-28 17:03:22
474
原创 把一个数转化为2进制(2)
Private Sub Command1_Click()Me.FontSize = 24Print erjinzhi(230) End SubPrivate Function erjinzhi(m As Byte) AsStringDim n As Byten = mConst er As Byte = 2Dim shang As ByteDim yushu
2016-04-28 16:40:25
696
原创 把23转化为2进制
Private Sub Command1_Click()Me.FontSize = 24Dim n As Byten = 23Const er As Byte = 2Dim shang As ByteDim yushu(1 To 5) As ByteDim i As Bytei = 5shang = n \ eryushu(i) = n Mod erWh
2016-04-28 16:37:22
1392
原创 多位数*1位数
Private Sub Command1_Click() Cls Dim a() As Long, i As Long Dim b As String Dim c As Long Dim changdu As Long changdu = Len(Text1.Text) ReDim a(changdu) For i = 1 To ch
2016-04-21 16:56:41
305
原创 两位数*一位数
Option Base 1Private Sub Command1_Click() Me.FontSize = 45 Dim n1() As Byte, n1len As Long Dim n2() As Byte, n2len As Long Dim yushu1 As Byte Dim yushu2 As Byte Dim i A
2016-04-14 17:29:24
200
原创 一位数与一位数相乘
Private Sub Command1_Click() Me.FontSize = 45 Dim n1 As Byte Dim n2 As Byte Dim yushu As Byte Dim shang As Byte Dim tempResult As Byte n1 = Int(Val(Me.Text1.
2016-04-14 16:27:42
280
原创 随机生成N个数,并从大到小排序。。。。。。。
搞了半天,敲来敲去,还是没懂。弄着这些代码。虽然没心力交瘁,但也腰酸背痛啊。不过也算弄出来了。看样子,一切不懂都源于不看书。Option Base 1Private Sub Command1_Click()ClsFont.Size = 20Size = Int(Val(Me.Text1.Text))Dim n As IntegerDim A()
2016-03-31 17:16:01
3277
原创 随机生成15个数,最小的在最下方。。。。。。。
Private Sub Command1_Click()ClsFont.Size = 20Dim n As IntegerDim A(15) As Integern = 1While n A(n) = Int(Rnd * 1000) n = n + 1Wend'开始排序Dim swap As Integern = 1While
2016-03-31 16:57:14
257
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人