- 博客(15)
- 收藏
- 关注
原创 随机产生一百个数并排序
随机产生一百个数并进行排序 冒泡法 Dim a(1 To 100) As Integer Private Sub Command1_Click() Form_Load End Sub Private Sub Command2_Click() p = "" For i = 1 To 99 For j = 1 To 100 - i I
2016-05-12 18:12:28 2102
原创 随机产生十个数并排序排序
随机产生10个10~100之间的整数 选择法 Dim a(1 To 10) As Integer Private Sub Command1_Click() Form_Load End Sub Private Sub Command2_Click() p = "" For i = 1 To 9 For j = j + 1 To 10
2016-05-12 17:51:14 2714 1
原创 随机十个数的排序,选择法排序
打开软件,进行编译 随机十个数的排序,选择法排序 Private Sub Command1_Click() Me.Font.Size = 30 Dim a(10) As Integer Dim i As Integer For i = 1 To 10 a(i) = 10 + Int(Rnd() * 100) Print a(i) Next i Print
2016-05-07 17:46:15 783
原创 十进制转为十六进制
打开VB,选取command按钮,在command中进行编译,内容如下: Private Sub Command1_Click() Me.Font.Size = 30 Dim a As Integer Dim b As Integer Dim s As String Dim yushu As Byte a = 1700: b = 16 While a yushu = a Mod
2016-05-07 17:27:55 623
原创 十进制转化为十六进制
打开软件,在command中进行编译。 当n=23时, Private Sub Command1_Click() Dim n As String n = 23 Const shiliu As Byte = 16 Dim returnS As String Dim shang As Byte Dim yushu(1 To 3) As Byte Dim i As Byte i =
2016-04-28 17:33:22 786
原创 十进制转为二进制
打开VB软件,在command中进行编译,程序如下: 当n=23时, Private Sub Command1_Click() Dim n As Byte n = 23 Const er As Byte = 2 Dim returnS As String Dim shang As Byte Dim yushu(1 To 5) As Byte Dim i As Byte i =
2016-04-28 16:58:58 479
原创 乘法:n对2
打开软件选择一个command和两个text,之后再command下进行一系列的编译 Private Sub Command1_Click() Dim c1 As Byte Dim c2 As Byte Dim a() As Byte Dim b As String Dim changdu As Long, i As Long changdu = Len(Text
2016-04-21 17:41:36 307
原创 十个随机数字求和
打开VB软件在工程一中的form1中进行 在工具箱中找到commandbutton在form1中建立command1 在command1中进行编译,双击command1打开编译窗口 在通用中编译 Dim sum As Integer Dim i As Integer Dim a As Integer 在command1中编译 第一种: Private Sub
2016-04-09 22:14:37 947
原创 随机出数并排列
Option Base 1 Private Sub Command1_Click() Cls Font.size = 30 Dim n As Integer Dim size As Integer size = Int(Val(Text1.Text)) Dim sierdun() As Integer ReDim sier
2016-03-31 17:45:29 279
原创 排15个数
Option Base 1 Private Sub Command1_Click() Cls Font.Size = 30 Dim n As Integer Dim sierdun(15) As Integer n = 1 While n sierdun(n) = Int(Rnd * 1000)
2016-03-31 16:23:39 271
原创 对VB的感想
一开始感觉这门课很难,感觉一些东西很难学,因为之前有一些东西从未接触过,而且老多专有名词看不懂,后来随着学习,逐渐懂得了一点,当做出老师上课教的一些程序,心中还蛮有成就感的。不过VB真的不好学,好复杂。
2016-03-28 14:12:33 323
原创 比较15个数的大小1
在command1中编辑 Private Sub Command1_Click() Cls Me.Font.Size = 24 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
2016-03-24 17:43:25 234
原创 比较15个数的大小
Private Sub Command1_Click() Cls 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
2016-03-24 17:28:15 311
原创 比较两个数大小
比较a,b的大小 在command1中进行编辑: 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
2016-03-24 17:10:20 384
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人