- 博客(15)
- 收藏
- 关注
原创 随机十个数的排序,选择法排序
打开软件,进行编译随机十个数的排序,选择法排序Private Sub Command1_Click()Me.Font.Size = 30Dim a(10) As IntegerDim i As IntegerFor i = 1 To 10 a(i) = 10 + Int(Rnd() * 100) Print a(i)Next iPrint
2016-05-12 16:52:44
524
原创 十进制改为十六进制
将一个数转化为二进制数例如将230转换为二进制建立一个command 在command中输入以下内容Private Sub Command1_Click()Me.Font.Size = 60 Print shiliujinzhi(56)End SubPrivate Function shiliujinzhi(m As Byte) As String
2016-04-28 17:24:35
258
原创 将一个数换为二进制
将一个数转化为二进制数例如将230转换为二进制建立一个command 在command中输入以下内容Private Sub Command1_Click() Me.Font.Size = 60 Print erjinzhi(230)End SubPrivate Function erjinzhi(m As Byte) As String Dim
2016-04-28 17:12:52
507
原创 一乘一个
1打开软件,建立两个text,一个commandbutton,双击,在窗口中输入以下内容。2Dim n1 As ByteDim n2 As ByteDim shang As ByteDim yushu As ByteDim tempresult As Byten1 = Int(Val(Me.Text1.Text))n2 = Int(Val(Me.Text2.Te
2016-04-21 17:27:01
215
原创 vb
打开vb后点击commandbutton拖入form1中,在把textbox拖入form中创建两个。Private Sub Command1_Click()ClsDim n() As ByteDim r() As ByteDim b As StringDim c As ByteDim i As LongDim L As LongL = Len(Me.Text
2016-04-21 17:18:55
181
原创 阶乘的
Private Sub Command1_Click()ClsFont.Size = 70Print 阶乘(12)End SubPrivate Function 阶乘(n As Integer) As LongIf n = 1 Then阶乘 = 1Else阶乘 = n * 阶乘(n - 1)End IfEnd Function
2016-04-14 17:37:38
188
原创 十个随机数求和 四
Private Sub Command1_Click()ClsFont.Size = 70Print f(100)End SubPrivate Function f(x As Integer) As Long If x = 1 Then f = x Else f = x + f(x - 1) End If
2016-04-14 16:51:59
241
原创 十个随机数求和 三
Private Sub Command1_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
2016-04-14 16:51:16
244
原创 十个随机数求和 二
Private Sub Command1_Click() sum = 0 For i = 1 To 10 Randomize a = Int(1000 * Rnd) sum = sum + a i=i+1 Next MsgBox "10个随机数和为:" & sum Do While i Ra
2016-04-14 16:50:03
276
原创 十个随机数求和 一
Private Sub Command1_Click() sum = 0 For i = 1 To 10 Randomize a = Int(1000 * Rnd) sum = sum + a MsgBox "10个随机数和为:" & sum Next Do While i Randomi
2016-04-14 16:49:24
360
原创 作业作业 刚才忘加Option Base 1了
Option Base 1Private Sub Command1_Click()ClsFont.Size = 30Dim n As Integer, x As Integerx = Int(Val(Me.Text1.Text))Dim a() As IntegerReDim a(x)n = LBound(a)While n a(n) = Int(Rnd *
2016-03-31 17:28:15
555
原创 第三个
Private Sub Command1_Click()ClsFont.Size = 30Dim n As Integer, x As Integerx = Int(Val(Me.Text1.Text))Dim a() As IntegerReDim a(x)n = LBound(a)While n a(n) = Int(Rnd * 1000)n = n +
2016-03-31 17:18:41
170
原创 15个数排序
Private Sub Command1_Click()ClsFont.Size = 30Dim n As IntegerDim sierdun(15) As Integern = 1While n sierdun(n) = Int(Rnd * 1000)n = n + 1WendDim t As Integer, m As Integerm = 1
2016-03-31 17:06:21
241
原创 随机数的
Private Sub Command1_Click()ClsFont.Size = 30Dim n As IntegerDim sierdun(15) As Integern = 1While n sierdun(n) = Int(Rnd * 1000)n = n + 1Wendn = 1While n Print sierdun(n)n =
2016-03-31 17:05:22
180
原创 vb作业
Private Sub Command1_Click()ClsMe.Font.Size = 24Dim a As IntegerDim b As IntegerDim c As IntegerDim d As IntegerDim e As IntegerDim f As IntegerDim g As IntegerDim h As IntegerDi
2016-03-24 17:43:58
245
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人