- 博客(22)
- 收藏
- 关注
原创 冒泡排序法
Private Sub Command1_Click()endtime = Nowpasstime = endtime - startimeLabel2.Caption = Format(endtime, "hh:mm:ss")Label3.Caption = Format(passtime, "hh:mm:ss")Command2.Enabled = FalseComma
2016-05-12 18:12:57
286
原创 冒泡排序法
Private Sub Command1_Click()Me.Font.Size = 30Dim a(10) As IntegerDim i As IntegerDim j As IntegerFor i = 1 To 10a(i) = Int(Rnd * 100)Print a(i)Next iPrintFor i = 1 To 9 F
2016-05-12 17:23:29
272
原创 十六进制
Private Sub Command2_Click()Me.Font.Size = 50Dim a As Integera = 1230Dim b As Integerb = 16Dim s As StringDim yushu As ByteWhile a yushu = a Mod bIf yushu s = yushu & sElses
2016-05-07 18:13:39
666
原创 二进制和十六进制
Dim j As IntegerFor j = 1 To 9For i = j + 1 To 10If a(j) swap a(j), a(i)End IfNext iNext jFor i = 1 To 10Print a(i)Next iPrint 同样是230的二进制,但是呢?这次比上次的程序容易
2016-05-07 17:58:44
530
原创 16进制
Private Sub Command1_Click()Print erjinzhi(230)End SubPrivate Function erjinzhi(m As Byte) AsStringDim n As Byten = mConst er As Byte = 16Dim shang As ByteDim yushu(1 To 2) As ByteDi
2016-04-28 17:13:22
212
原创 二进制
Private Sub Command1_Click()Me.Font.Size = 70Dim 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 erW
2016-04-28 17:10:02
305
原创 二进制
Private Sub Command2_Click()Me.Font.Size = 60Dim n As Byten = 23Const er As Byte = 2Dim s As StringDim shang As ByteDim yushu(1 To 5) As ByteDim i As Bytei = 1shang = n \ eryushu
2016-04-28 17:04:32
186
原创 10的阶乘
Private Sub Command2_Click()Print 阶乘(10)End SubPrivate Function 阶乘(n As Integer) As LongIf n = 1 Then 阶乘 = 1 Else 阶乘 = n * 阶乘(n - 1) End IfEnd Function
2016-04-14 17:44:53
362
原创 VB程序语言3
Option ExplicitDim i As Integer, sum As IntegerPrivate Sub Command1_Click()ClsFont.Size = 70Static i As Integeri = i + 1Print iEnd Sub
2016-04-14 16:46:36
252
原创 VB程序语言1
Private Sub Command1_Click()ClsFont.Size = 70Dim arr(5) As IntegerFor i = 1 To 5arr(i) = iNextFor Each t In arrPrint tNextEnd Sub
2016-04-14 16:24:52
508
原创 随机取10个数第十种
Cls Dim n As Integer ,s As IntegerDim t As IntegerDim a(10) As Integern=1While na(n)=Int(Rnd*1000)n=n+1Wend n=1WhilenPrint a(n)n=n+1Wends=0n=0For Each t In as=s+tNe
2016-04-10 16:33:41
2591
原创 随机取10个数第九种
Private Sub Command1-Click()Cls Font.Size=70Print f(100)End Sub Private Function f(x As Integer )As longIf x=1 Thenf=xElsef=x-f(x-1)End IfEnd Function该程序我没有操作过,不知道执行得了吗?希望可以执
2016-04-10 16:26:02
339
原创 随机取10个数第八种
Dim sum As Integer Dim i As IntegerDim a As IntegerPrivate Sub Command1-Click()sum=0For i=1 To 10 step 2Randomizea=Int(1000*Rnd)sum=sum+aNextMsgBox"10个随机数和为:"&sumi=1Do While i
2016-04-10 16:11:31
455
原创 随机取10个数6
Dim sum As Integer Dim sum As Integer Dim i As Integer Dim i As IntegerDim a As Integer Dim
2016-04-10 16:09:45
488
原创 随机取10 个数5
Dim Sum As IntegerDim i As Integer Dim a As IntegerPrivate Sub Command1-Click()sum =0For i=1To 10 step 2Randomizea=Int(1000*Rnd)sum=sum+aMsgBox"10个随机数和为:"&sumNextDo While iRand
2016-04-10 15:39:04
613
原创 随便取10 个数4
Dim sum AS IntegerDim i As IntegerDim a As IntegerPrivate Sub Command1-Click ()sum =0For i=1To10 step1Randomizea=Int(1000*Rnd)sum =sum+aMsgBox "10个随机数和为:"&sumNextEnd Sub其实
2016-04-10 11:31:54
350
原创 随便取10 个数3
Dim sum As IntegerDim i As IntegerDim a As IntegerPrivate Sub Command 1-Click()sum=0For i=1 To 10Randomizea=int(1000*Rnd)sum=sum+aMsgBox"10个随机数和为:"&sumNextEnd Sub这是第三个取10
2016-04-10 11:15:55
377
原创 随便取10 个数2
Private Sub Command1 -Click ()Cls Dim n As Integer ,s As IntegerDim a(10) As Integern=1While na(n)=Int(Rnd*1000)n=n=1Wendn=1While nPrint a(n)n=n+1Wends=0n=1While ns
2016-04-10 11:03:45
269
原创 随便取十个数1
Private Sub comman1 -Click()Dim i As IntegerDim a(10) As IntegerDim sum As IntegerRandomizeFor i=1 To 10a(i)=Int(Rnd*1000)+1sum=sum+a(i)Next iPrint sumEnd Sub这是我做随便取十个数的第一个VB语言程序
2016-04-10 10:52:58
1752
原创 做完VB后的感言
VB语言说爱你不容易啊!虽然每次都可以操作出来,但是我还要写到博客上,然而老天就跟我作对,对我太不公平了,我就进不去,然后就写不了博客。来了好多次机房说来写博客,但是高高兴兴来却失望的回去了。VB语言你说你毒害我多深,晚上睡觉都不安稳,都梦到我做VB语言,早上还把我吓醒了。哎!哎哎哎哎哎哎哎哎哎!!!!!!!!!!!!!!!!!!!!!!!!!!!!其实我已经写了三个博客了的,既然
2016-04-10 10:34:00
343
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人