自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 收藏
  • 关注

原创 最大值 最小值 平均值

Private Sub Command1_Click()Dim max As Integer, min As Integer, sum As Integer, average As SingleDim x As Integer, i As IntegerRandomizemax = 10: min = 99sum = 0For i = 1 To 20x = Int(90

2016-06-02 18:03:00 1356

原创 平行四边形

Private Sub Form_Click()ClsPrintFor n = 1 To 8 Print Tab(n + 20);  For m = 1 To 10   Print Spc(1); "*";   Next m   Print   Next nEnd Sub

2016-05-26 16:59:51 441

原创 登陆 笔记

登录--Form-frmLoginStartUpPosition=2账号---Label TextBox-txtUserID密码---Label TextBox-txtPassword登录、取消---CommandButtoncmdLogin--default:true---ENTERcmdCancel--cancel:true---ESC字体:大小:小一所有控

2016-05-19 17:47:34 277

原创 冒泡排序法

Private Sub Command1_Click()Me.FontSize = 30Dim a(10) As IntegerDim i As IntegerFor i = 1 To 10a(i) = 10 + Int(Rnd() * 100)    Print a(i);    Next iPrintDim p As StringDim j As Int

2016-05-12 18:07:53 236

原创 选择排序法 排列10个随机产生的10~100之间的数

Dim a(1 To 10) As IntegerPrivate Sub Command1_Click()  Form_LoadEnd SubPrivate Sub Command2_Click()p = ""For i = 1 To 9   For j = i + 1 To 10    If a(i)      t = a(i): a(i) = a(j

2016-05-07 18:18:45 2785

原创 10进制向16进制转化

Private Sub Command1_Click()Me.Font.Size = 60Dim a As IntegerDim b As IntegerDim s As StringDim yushu As Bytea = 1230b = 16While a       yushu = a Mod b      If yushu          s

2016-05-07 16:58:48 383

原创 任意255以内的十进制数转化为16进制数

Private Sub Command1_Click()Me.Font.Size = 35Print shiliujinzhi(255)End SubPrivate Function shiliujinzhi(m As Byte) As StringDim n As Byten = mConst shiliu As Byte = 16Dim returnS As S

2016-04-28 17:14:02 3694

原创 任意255以内的十进制数向二进制数的转化

Private Sub Command1_Click()Me.Font.Size = 35Print erjinzhi(230)End SubPrivate Function erjinzhi(m As Byte) As StringDim n As Byten = mConst er As Byte = 2Dim returnS As StringDim sh

2016-04-28 17:03:23 1763

原创 将十进制数23转化为二进制数

Private Sub Command1_Click()Me.Font.Size = 35Dim n As Byten = 23Const er As Byte = 2Dim shang As ByteDim yushu(1 To 5) As Bytei = 5shang = n \ eryushu(i) = n Mod erWhile shang i

2016-04-28 16:33:49 3295

原创 3乘1

Dim a As ByteDim b As StringDim c As Byte b = Mid(Me.Text1.Text, 1, 1)a1 = Int(Val(b))b = Mid(Me.Text1.Text, 2, 1)a2 = Int(Val(b))b = Mid(Me.Text1.Text, 3, 1)a3 = Int(Val(b))b = Me

2016-04-21 17:40:37 305

原创 多乘二 ?

Private Sub Command1_Click()Dim c1 As IntegerDim c2 As IntegerDim a() As ByteDim b As StringDim changdu As Long, i As Longchangdu = Len(Text1.Text)ReDim a(changdu)For i = 1 To changdu

2016-04-21 17:10:36 236

原创 两位数与个位数之和 ?

Private Sub Command1_Click()Me.Font.Size = 70Dim n1() As Byte, n1Len As LongDim n2() As Byte, n2Len As LongDim yushu1 As ByteDim yushu2 As ByteDim yushu2 As ByteDim shang As ByteDim i

2016-04-14 17:40:12 366

原创 两个个位数之积

Private Sub Command1_Click()Me.Font.Size = 40Dim n1 As Byte, n1Len As LongDim n2 As Byte, n2Len As LongDim yushu As ByteDim shang As ByteDim tempresult As Byten1 = Int(Val(Me.Text1.Text)

2016-04-14 16:59:06 355

原创 1000以内任意十个整数之和

Option ExplicitPrivate Sub Command1_Click() Font.Size = 30    Dim i As Integer    Dim a(10) As Integer    Dim sum As Integer    Randomize    For i = 1 To 10         a(i) = Int(Rnd * 10

2016-04-07 16:22:40 433

原创 最后一个

Option Base 1Private Sub Command1_Click()Font.size = 30Dim n As IntegerDim size As Integersize = Int(Val(Me.Text1.Text))size = Int(Val(Me.Text1.Text))Dim slerdum() As IntegerReDim sler

2016-03-31 17:43:09 230

原创 另一种做法(15个数中最小的数在最后)

Private Sub Command1_Click()Font.Size = 30Dim n As IntegerDim slerdum(15) As Integern = 1While n     slerdum(n) = Int(Rnd * 1000)    n = n + 1WendDim swap As Integerm = 1   While

2016-03-31 17:21:53 291

原创 15个数中,最后一个为最小的

Private Sub Command1_Click()Font.Size = 30Dim n As IntegerDim slerdum(15) As Integern = 1While n     slerdum(n) = Int(Rnd * 1000)    n = n + 1WendDim swap As Integern = 1   While

2016-03-31 17:04:07 342

原创 vb

Private Sub Command1_Click()Font.Size = 30Dim n As IntegerDim slerdum(15) As Integern = 1While n     slerdum(n) = Int(Rnd * 1000)    n = n + 1Wend  n = 1While n     Print slerdum

2016-03-31 16:39:51 248

原创 vb作业

Private Sub Command1_Click()Font.Size = 30Dim n As IntegerDim slerdum(15) As Integern = 1While n     slerdum(n) = Int(Rnd * 1000)    n = n + 1Wend  n = 1While n     Print slerdum

2016-03-31 16:30:17 228

空空如也

空空如也

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

TA关注的人

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