- 博客(17)
- 收藏
- 关注
原创 比较数的大小(比较法)
Private Sub Command1_Click()Dim a(10) As IntegerDim i As IntegerDim j As IntegerFor i = 1 To 10a(i) = 10 + Int(Rnd() * 1000)Print a(i);Next iPrintFor j = 1 To 9For i = j + 1 To 10
2016-05-19 17:55:46
420
原创 比较数的大小(冒泡法)
Private Sub Command1_Click()Dim a(10) As IntegerDim i As IntegerDim j As IntegerFor i = 1 To 10a(i) = 10 + Int(Rnd() * 1000)Print a(i);Next iPrintFor i = 1 To 9For j = 1 To 10 - i
2016-05-19 17:54:59
422
原创 转换为16进制
Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim s As StringDim yushu As Bytea = 1230: b = 16While a yushu = a Mod bIf yushu s = yushu & sElses = Chr(yushu + 55) &
2016-05-19 17:54:26
354
原创 16进制的转换
Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim s As StringDim yushu As Bytea = 1230: b = 16While a yushu = a Mod bIf yushu s = yushu & sElses = Chr(yushu + 55) &
2016-05-19 17:53:43
322
原创 16进制
Private Sub Command1_Click()Me.Font.Size = 50Print shiliujinzhi(4545)End SubPrivate Function shiliujinzhi(m As Integer)As StringDim n As Integern = mConst shiliu As Byte = 16Dim return
2016-05-19 17:53:18
426
原创 2进制
Private Sub Command1_Click()Me.Font.Size = 60Print erjinzhi(23)End Sub Private Function erjinzhi(m As Byte) AsStringDim n As Byten = mConst er As Byte = 2Dim returns As StringDi
2016-05-19 17:52:54
207
原创 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-05-19 17:52:14
253
原创 2位数乘1位数
Option Base 1Private 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-05-19 17:51:34
410
原创 1乘1
Option Base 1Private 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-05-19 17:50:53
472
原创 1*1
Private Sub Command1_Click()Dim n1 As ByteDim n2 As ByteDim yushu As ByteDim shang As ByteDim tempresult As Byten1 = Int(Val(Me.Text1.Text))n2 = Int(Val(Me.Text2.Text))tempresult = n1
2016-05-19 17:48:40
248
原创 十个随机数相加(9种方法)
(一) 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
2016-05-19 17:47:20
2385
原创 10得阶乘
Private Sub Command1_Click()Print 阶乘(10)End SubPrivate Function 阶乘(n As Integer) As LongIf n = 1 Then 阶乘 = 1 Else 阶乘 = n * 阶乘(n - 1) End If End Function
2016-04-14 17:05:32
395
原创 10个随机数相加
1.Option ExplicitPrivate Sub Command1_Click()ClsDim i As Integer, Sum As IntegerDim a(10) As IntegerRandomizeFor i = 1 To 10a(i) = Int(Rnd * 1000) + 1Sum = Sum + a(i)Next iPrint
2016-04-14 16:28:51
563
原创 n个随机数得排列
Option Base 1Private Sub Command1_Click()ClsFont.size = 30Dim n As IntegerDim size As Integersize = Int(Val(Me.Text1.Text))Dim sierdun() As IntegerReDim sierdun(size) As Integern =
2016-04-14 16:27:59
308
原创 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-31 16:17:48
221
原创 比较大小
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-31 16:16:31
415
原创 红糖水白糖水的转换--郝汉森
Private Sub 变换_Click()Dim a As Stringa = Me.Label1.CaptionMe.Label1.Caption = Me.Label2.CaptionMe.Label2.Caption = aDim b As Stringb = Me.Label1.ForeColorMe.Label1.ForeColor = Me.Label2.
2016-03-24 17:44:18
748
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅