- 博客(18)
- 收藏
- 关注
原创 比较数的大小(比较法)
Private Sub Command1_Click() Dim a(10) As Integer Dim i As Integer Dim j As Integer For i = 1 To 10 a(i) = 10 + Int(Rnd() * 1000) Print a(i); Next i Print For j = 1 To 9 For i = j + 1 To 10
2016-05-12 16:51:03
1037
原创 比较数的大小(冒泡法)
Private Sub Command1_Click() Dim a(10) As Integer Dim i As Integer Dim j As Integer For i = 1 To 10 a(i) = 10 + Int(Rnd() * 1000) Print a(i); Next i Print For i = 1 To 9 For j = 1 To 10 - i
2016-05-12 16:50:10
556
原创 转化为16进制
Private Sub Command1_Click() 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 s = Chr(yushu + 55) &
2016-05-12 16:49:18
518
原创 16进制的转换
Private Sub Command1_Click() 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 s = Chr(yushu + 55) &
2016-05-07 17:06:25
299
原创 十六进制
Private Sub Command1_Click() Me.Font.Size = 50 Print shiliujinzhi(4545) End Sub Private Function shiliujinzhi(m As Integer)As String Dim n As Integer n = m Const shiliu As Byte = 16 Dim return
2016-04-28 17:29:44
308
原创 2进制
Private Sub Command1_Click() Me.Font.Size = 60 Print erjinzhi(23) End Sub Private Function erjinzhi(m As Byte) AsString Dim n As Byte n = m Const er As Byte = 2 Dim returns As String Di
2016-04-28 17:29:09
238
原创 n*1,并将结果保存到文件夹中
Private Sub Command1_Click() Cls Dim a() As Byte Dim r() As Byte Dim b As String Dim c As Byte Dim i As Long Dim L As Long L = Len(Me.Text1.Text) ReDim a(L
2016-04-21 17:19:47
287
原创 2位数乘1位数
Option Base 1 Private Sub Command1_Click() Me.Font.Size = 70 Dim n1() As Byte, n1Len As Long Dim n2() As Byte, n2Len As Long Dim yushu1 As Byte, yushu2 As Byte Dim shang As B
2016-04-14 17:22:59
770
原创 1乘1
Option Base 1 Private Sub Command1_Click() Me.Font.Size = 70 Dim n1() As Byte, n1Len As Long Dim n2() As Byte, n2Len As Long Dim yushu As Byte Dim shang As Byte Dim temp
2016-04-14 17:02:13
287
原创 1*1
Private Sub Command1_Click() 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(Me.Text2.Text)) tempresult = n1
2016-04-14 16:42:40
224
原创 十个随机数相加(9种方法)
1. Option Explicit Private Sub Command1_Click() Cls Dim i As Integer, Sum As Integer Dim a(10) As Integer Randomize For i = 1 To 10 a(i) = Int(Rnd * 1000) + 1 Sum = Sum + a(i) Next i Print
2016-04-07 17:01:39
2742
原创 n个随机数的排列
Option Base 1 Private Sub Command1_Click() Cls Font.size = 30 Dim n As Integer Dim size As Integer size = Int(Val(Me.Text1.Text)) Dim sierdun() As Integer ReDim sierdun(size) As Integer n =
2016-03-31 17:15:25
399
原创 VB15个数字作业
Private Sub cmdSort_Click() Dim A(14) As Integer Dim I, J As Integer Dim Temp As Integer Form1.Cls Randomize For I = 0 To 14 A(I) = Int(Rnd * 1000) Print A(I); Ne
2016-03-24 17:39:59
260
原创 比较大小
Private Sub Command1_Click() Cls Me.Font.Size = 50 Dim a As Integer Dim b As Integer Dim swap As Integer a = Int(Rnd * 1000) b = Int(Rnd * 1000) If a
2016-03-24 17:30:06
326
原创 红糖水,白糖水交换
Private Sub 变换_Click() Dim a As String a = Me.Label1.Caption Me.Label1.Caption = Me.Label2.Caption Me.Label2.Caption = a Dim b As String b = Me.Label1.ForeColor Me.Label1.ForeColor = Me.Label2.
2016-03-17 17:27:52
281
转载 数据变量
Private Sub Command1_Click() Cls Me.Font.Size = 50 Dim b As Integer, c As Integer Dim d As Integer c = Int(Rnd() * 1000) b = Int(Rnd() * 1000) Print "b=" & b Print "c=" & c d = c c = b b
2016-03-17 17:06:31
256
原创 我的大学同学王晶晶
王晶晶,一个神奇的物种,是我在大学里遇到过的最屌丝的·人之一,个子很高,头发很长,但是智商却跟它们不成正比。今天在博客里发现了她,竟然起了个LHWJJ的名字,一看他这个名字就知道有多屌丝,起什么不好,非要起一个“路滑王晶晶”。我也是醉了,至于她的其他壮举,就等我接下来几天的详细报道吧!!!
2016-03-17 16:37:33
687
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人