自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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 373

原创 比较数的大小(冒泡法)

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 368

原创 转换为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 307

原创 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 260

原创 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 363

原创 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 156

原创 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 213

原创 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 331

原创 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 420

原创 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 194

原创 十个随机数相加(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 2188

原创 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 333

原创 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 506

原创 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 253

原创 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 173

原创 比较大小

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 348

原创 红糖水白糖水的转换--郝汉森

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 686

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除