- 博客(16)
- 收藏
- 关注
原创 星号版的平行四边形
Private Sub Command1_Click() Cls Print For n = 1 To 10 Print Tab(n + 20); For m = 1 To 10 Print Spc(1); "*"; Next m Print Next n End Sub
2016-05-26 16:59:35
1309
原创 随机比较10个数大小(从小到大)选择排序法
Private Sub Command1_Click() Dim a(10) As Integer For i = 1 To 10 Randomize a(i) = Int(Rnd * 90) + 10 Next For i = 1 To 9 For j = i + 1 To 10 If a(i) > a(j) Then r = a(i) a(i) = a(j) a(j) =
2016-05-12 18:05:25
1501
原创 16进制
Private Sub Command1_Click() Me.Font.Size = 70 Dim a As Integer Dim b As Integer Dim s As String Dim yushu As Byte a = 1230: b = 16 While a yushu = a Mod b If yushu s = yushu & s Else
2016-05-07 17:47:18
297
原创 十六进制表示
Private Sub Command1_Click() Me.Font.Size = 30 Print shiliujinzhi(230) End Sub Private Function shiliujinzhi(m As Byte) As String Dim n As Byte n = m Const shiliu As Byte = 16 Dim retu
2016-04-28 17:40:54
629
原创 求给定一个正整数的二进制表示
Private Sub Command1_Click() Me.Font.Size = 30 Print erjinzhi(23) End Sub Private Function erjinzhi(m As Byte) As String Dim n As Byte n = m Const er As Byte = 2 Dim returnS As String
2016-04-28 17:03:09
965
原创 23的二进制表示
Private Sub Command1_Click() Me.Font.Size = 30 Dim n As Byte n = 23 Const er As Byte = 2 Dim shang As Byte Dim yushu(1 To 5) As Byte Dim i As Byte i = 5 shang = n \ er yushu(i) = n M
2016-04-28 16:32:51
1366
原创 乘法-三位数乘两位数
Private Sub 乘法_Click() Me.Font.Size = 40 Cls Dim c As Byte Dim a() As Byte Dim b As String Dim changdu As Long, i As Long changdu = Len(Text1.Text) ReDim a(changdu) For i = 1 To changdu b
2016-04-21 17:42:06
720
原创 乘法1
Private Sub 乘法_Click() Me.Font.Size = 40 Dim a As Byte, c As Byte Dim b As String b = Me.Text1.Text a = Int(Val(b)) b = Me.Text2.Text c = Int(Val(b)) Dim r As Byte r = a * c Print r
2016-04-21 16:25:32
181
原创 阶乘
一节课同时完成多项作业,真的是有很大的成就感啊,啦啦啦 Private Sub Command2_Click() Font.Size = 70 Print 阶乘(11) End Sub Private Function 阶乘(n As Integer) As Long If n = 1 Then 阶乘 = 1 Else 阶乘 = n * 阶乘(n - 1) End If
2016-04-14 17:26:21
252
原创 两位数乘一位数
Option Base 1 Private Sub Command1_Click() Me.Font.Size = 30 Dim n1() As Byte, n1len As Long Dim n2() As Byte, n2len As Long Dim yushu1 As Byte Dim yushu2 As Byte Dim shang As Byte Dim tempR
2016-04-14 17:18:46
252
原创 两数相乘
加油,慢慢来。 Private Sub Command1_Click() Me.Font.Size = 70 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.Text)) n2 = Int(Val
2016-04-14 16:32:06
274
原创 VB作业
Private Sub Command2_Click() Cls Dim n As Integer, s As Integer Dim a(10) As Integer n = 1 While n a(n) = Int(Rnd * 1000) n = n + 1 Wend n = 1 While n Print a(n) n = n + 1 Wend s = 0
2016-04-07 17:54:17
180
原创 VB作业
Option Explicit 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 P
2016-04-07 17:51:58
158
原创 把握青春.
Oh,my god......每次vb作业都会剩一个,剩的这一个就总是那么费脑细胞,真是没谁了,有时候做作业做不下去时,想到..那句话,天将降大任于斯人也,顿时有了做作业的勇气. come on,胜利总是在挫折的后面,哈哈哈哈,反正还是做完了,小小的开心一下......... Option Base 1 Private Sub Command1_Click() Dim n As
2016-04-06 14:25:26
245
原创 本人辛苦自创,请勿抄袭
再一次写VB作业,学以致用的feel真的不一样,啊哈哈哈哈哈。。。。。。 Private Sub Command1_Click() Cls Font.Size = 30 Dim n As Integer Dim sierdun(15) As Integer n = 1 While n sierdun(n) = Int(Rnd * 1000) n
2016-03-31 16:46:16
315
原创 VB作业
终于有VB了,好激动,赶紧写作业 Private Sub Command1_Click() Cls Me.Font.Size = 24 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 Di
2016-03-30 14:09:25
161
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人