- 博客(16)
- 收藏
- 关注
原创 星号版的平行四边形
Private Sub Command1_Click()ClsPrintFor n = 1 To 10Print Tab(n + 20);For m = 1 To 10Print Spc(1); "*";Next mPrintNext nEnd Sub
2016-05-26 16:59:35
1445
原创 随机比较10个数大小(从小到大)选择排序法
Private Sub Command1_Click()Dim a(10) As IntegerFor i = 1 To 10Randomizea(i) = Int(Rnd * 90) + 10NextFor i = 1 To 9For j = i + 1 To 10If a(i) > a(j) Thenr = a(i)a(i) = a(j)a(j) =
2016-05-12 18:05:25
1585
原创 16进制
Private Sub Command1_Click()Me.Font.Size = 70Dim a As IntegerDim b As IntegerDim s As StringDim yushu As Bytea = 1230: b = 16While a yushu = a Mod bIf yushu s = yushu & sElse
2016-05-07 17:47:18
358
原创 十六进制表示
Private Sub Command1_Click()Me.Font.Size = 30Print shiliujinzhi(230)End SubPrivate Function shiliujinzhi(m As Byte) As StringDim n As Byten = mConst shiliu As Byte = 16Dim retu
2016-04-28 17:40:54
723
原创 求给定一个正整数的二进制表示
Private Sub Command1_Click()Me.Font.Size = 30Print erjinzhi(23)End SubPrivate Function erjinzhi(m As Byte) As StringDim n As Byten = mConst er As Byte = 2Dim returnS As String
2016-04-28 17:03:09
1019
原创 23的二进制表示
Private Sub Command1_Click()Me.Font.Size = 30Dim n As Byten = 23Const er As Byte = 2 Dim shang As ByteDim yushu(1 To 5) As ByteDim i As Bytei = 5shang = n \ eryushu(i) = n M
2016-04-28 16:32:51
1524
原创 乘法-三位数乘两位数
Private Sub 乘法_Click()Me.Font.Size = 40ClsDim c As ByteDim a() As ByteDim b As StringDim changdu As Long, i As Longchangdu = Len(Text1.Text)ReDim a(changdu)For i = 1 To changdub
2016-04-21 17:42:06
823
原创 乘法1
Private Sub 乘法_Click()Me.Font.Size = 40Dim a As Byte, c As ByteDim b As Stringb = Me.Text1.Texta = Int(Val(b))b = Me.Text2.Textc = Int(Val(b))Dim r As Byter = a * cPrint r
2016-04-21 16:25:32
244
原创 阶乘
一节课同时完成多项作业,真的是有很大的成就感啊,啦啦啦Private Sub Command2_Click()Font.Size = 70Print 阶乘(11)End SubPrivate Function 阶乘(n As Integer) As LongIf n = 1 Then阶乘 = 1Else阶乘 = n * 阶乘(n - 1)End If
2016-04-14 17:26:21
302
原创 两位数乘一位数
Option Base 1Private Sub Command1_Click()Me.Font.Size = 30Dim n1() As Byte, n1len As LongDim n2() As Byte, n2len As LongDim yushu1 As ByteDim yushu2 As ByteDim shang As ByteDim tempR
2016-04-14 17:18:46
298
原创 两数相乘
加油,慢慢来。Private Sub Command1_Click()Me.Font.Size = 70Dim n1 As ByteDim n2 As ByteDim yushu As ByteDim shang As ByteDim tempResult As Byten1 = Int(Val(Me.Text1.Text))n2 = Int(Val
2016-04-14 16:32:06
325
原创 VB作业
Private Sub Command2_Click()ClsDim n As Integer, s As IntegerDim a(10) As Integern = 1While n a(n) = Int(Rnd * 1000)n = n + 1Wendn = 1While n Print a(n)n = n + 1Wends = 0
2016-04-07 17:54:17
239
原创 VB作业
Option ExplicitPrivate Sub Command1_Click()Dim i As IntegerDim a(10) As IntegerDim sum As IntegerRandomizeFor i = 1 To 10 a(i) = Int(Rnd * 1000) + 1 sum = sum + a(i)Next iP
2016-04-07 17:51:58
215
原创 把握青春.
Oh,my god......每次vb作业都会剩一个,剩的这一个就总是那么费脑细胞,真是没谁了,有时候做作业做不下去时,想到..那句话,天将降大任于斯人也,顿时有了做作业的勇气. come on,胜利总是在挫折的后面,哈哈哈哈,反正还是做完了,小小的开心一下.........Option Base 1 Private Sub Command1_Click()Dim n As
2016-04-06 14:25:26
294
原创 本人辛苦自创,请勿抄袭
再一次写VB作业,学以致用的feel真的不一样,啊哈哈哈哈哈。。。。。。Private Sub Command1_Click()ClsFont.Size = 30Dim n As IntegerDim sierdun(15) As Integern = 1While n sierdun(n) = Int(Rnd * 1000) n
2016-03-31 16:46:16
376
原创 VB作业
终于有VB了,好激动,赶紧写作业Private Sub Command1_Click()ClsMe.Font.Size = 24Dim a As IntegerDim b As IntegerDim c As IntegerDim d As IntegerDim e As IntegerDim f As IntegerDim g As IntegerDi
2016-03-30 14:09:25
216
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅