- 博客(11)
- 收藏
- 关注
原创 输出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 bs = f(yushu) & sa = a \ bWendPrint sEnd Sub
2016-05-11 19:50:00
964
原创 给定一个正整数的二进制表示
Private Sub Command1_Click() Me.Font.Size = 30 Dim n As Byte n = 23 Const er As Byte = 2 Dim shang As Byte Dim yushu(1 To 5) As Byte Dim i As Byte i = 5shang = n \ er yushu(i) = n Mod er
2016-04-28 16:35:13
576
原创 三位数乘一位数
Private Sub Command1_Click() Dim a As Byte Dim b As String Dim 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)
2016-04-21 17:28:39
362
原创 第十种循环
Private Sub Command1_Click() Dim arr(5) As Integer For i = 1 To 5 arr(i) = i Next For Each t In arr Print t NextEnd Sub
2016-04-14 17:41:59
199
原创 一位数*一位数和两位数*一位数
Private Sub Command1_Click() Dim n1 As Byte Dim n2 As Byte Dim yushu As Byte Dim shang As Byte Dim tempResult As Byte n1 = Int(Val(Me.Text1.Text)) n2 = Int(Val(Me.Text2.Text)) tempResult = n1 *
2016-04-14 17:28:48
421
原创 随机生成10个数(使用9种循环)
《六》 Private Sub Command1_Click()Dim i As Integer Dim s As Integer Dim sum As Integer sum = 0 For i = 10 To 1 Step -1 a = Int(Rnd * 1000) sum = sum + aNext MsgBox “10个随机数的和为:” & sumEnd
2016-04-13 21:01:59
799
原创 随机生成10个数(使用9种循环)
《三》 Private Sub Command1_Click() Dim i As Integer Dim s As Integer Dim sum As Integer sum = 0 For i = 1 To 10 Step 2 a = Int(Rnd * 1000) sum = sum + a MsgBox “10个随机数的和为:” & sum Next
2016-04-13 20:57:32
1091
原创 随机生成10个数(使用9种循环)。
《一》Private Sub Command1_Click() Dim i As Integer Dim a(10) As Integer Dim sum As Integer For i = 1 To 10 a(i) = Int(Rn
2016-04-13 20:18:56
1031
原创 输出数中最小的一个数在最后!!!
Private Sub Command1_Click() Cls Font.Size = 30 Dim n As Integer Dim sierdun(15) As Integer n = 1 While n <= 15 sierdun(n) = Int(Rnd * 1000) n = n + 1 Wend Dim swap As Integer n = 1 While n <= 14 If s
2016-04-02 12:19:15
294
原创 十个数输出!!!
Cls ﹉﹉擦出屏幕 Font.Size=30﹉﹉字体大小等于30 Dim n As Integer Dim sierdun(10) As Integer ﹉﹉﹉﹉下面给上面创建的15个空间赋予一个随机变量 n=1 While n<=10 sierdun(n)=Int(Rnd * 1000) n=n+1 Wend ﹉﹉﹉将其中的10个整数在屏幕上显示 n=1 while n<=10 print s
2016-04-02 12:07:31
311
原创 排序啦!(15个数从大到小排序)
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 Dim i As Integer Di
2016-03-27 11:38:54
835
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人