- 博客(13)
- 收藏
- 关注
原创 按选择排序法排序。
Private Sub Command1_Click()Me.Font.Size = 50Dim a(10) As IntegerDim i As Integer For i = 1 To 10 a(i) = 10 + Int(Rnd() * 100) Print a(i) Next iPrintEnd Sub 还没开始排序
2016-05-07 17:47:19 539
原创 求给定一个正整数的十六进制表示 vb
Private Sub Command1_Click()Me.Font.Size = 50Dim n As Byten = 118Dim shang As ByteDim yushu(1 To 2) As ByteConst shiliu As Byte = 16Dim i As Bytei = 2shang = n \ shiliuyushu(i) =
2016-04-28 17:04:24 305
原创 求给定一个正整数的二进制表示 vb
Private Sub Command1_Click()Dim n As Byten = 23Dim shang As ByteDim yushu(1 To 5) As ByteConst er As Byte = 2Dim i As Bytei = 5shang = n \ eryushu(i) = n Mod erWhile shang
2016-04-28 16:31:28 433
原创 三个数乘法。vb
Private Sub Command1_Click()Cls Font.Size = 30 Dim a As Double Dim b As Double Dim c As Double a = 8 b = 9 c = a * b Print cEnd Sub 先写上最简单的乘法吧 = = Dim a As Byte Di
2016-04-21 16:22:00 318
原创 随机十个数求和8
..Private Sub Command1_Click()Cls Dim n As Integer Dim 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 a(n
2016-04-07 17:42:01 157
原创 随机十个数求和7
............... 心力交瘁...Dim sum As IntegerDim i As IntegerDim a As IntegerPrivate Sub Command1_Click() sum = 0 For i = 1 To 10 Randomize a = Int(Rnd * 1000) sum = sum
2016-04-07 17:37:06 164
原创 随机十个数求和6
好累...Dim sum As IntegerDim i As IntegerDim a As IntegerPrivate Sub Command1_Click() sum = 0 For i = 1 To 10 i = i + 1 Randomize a = Int(Rnd * 1000) sum = sum +
2016-04-07 17:30:36 233
原创 随机十个数求和5
继续 ....Private Sub Command1_Click() Cls Print f(10)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-07 17:19:57 180
原创 随机十个数求和4
Dim sum As IntegerDim i As IntegerDim a As IntegerPrivate Sub Command1_Click() sum = 0 For i = 1 To 10 Randomize a = Int(Rnd * 1000) sum = sum + a MsgBox "10个随机
2016-04-07 17:14:46 181
原创 随机十个数求和3
继续!!Dim sum As IntegerDim i As IntegerDim a As IntegerPrivate Sub Command1_Click() sum = 0 For i = 1 To 10 Randomize a = Int(Rnd * 1000) sum = sum + a Next
2016-04-07 17:12:29 181
原创 随机十个数求和2
继续写上!!!Private Sub Command1_Click()Cls Dim n As Integer Dim 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 Pri
2016-04-07 16:54:09 142
原创 随机十个数求和
今天新学的,趁热打铁!!!! 赶紧写上!! 省着以后补!!Option ExplicitPrivate Sub Command1_Click() Dim i As Integer Dim a(10) As Integer Dim sum As IntegerRandomize For i = 1 To 10 a(i) = Int(Rnd * 1000)
2016-04-07 16:24:07 274
原创 15个数排序
Me.Font.Size = 50 Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer Dim e As Integer Dim f As Integer Dim g As Integer Dim h As Integer D
2016-04-03 23:03:30 129
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人