自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 随机产生一百个数并排序

随机产生一百个数并进行排序冒泡法Dim a(1 To 100) As IntegerPrivate Sub Command1_Click()    Form_LoadEnd SubPrivate Sub Command2_Click()   p = ""   For i = 1 To 99    For j = 1 To 100 - i      I

2016-05-12 18:12:28 2078

原创 随机产生十个数并排序排序

随机产生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 = j + 1 To 10

2016-05-12 17:51:14 2670 1

原创 随机十个数的排序,选择法排序

打开软件,进行编译随机十个数的排序,选择法排序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-07 17:46:15 774

原创 十进制转为十六进制

打开VB,选取command按钮,在command中进行编译,内容如下:Private Sub Command1_Click()Me.Font.Size = 30Dim a As IntegerDim b As IntegerDim s As StringDim yushu As Bytea = 1700: b = 16While a yushu = a Mod

2016-05-07 17:27:55 607

原创 十进制转化为十六进制

打开软件,在command中进行编译。当n=23时,Private Sub Command1_Click()Dim n As Stringn = 23Const shiliu As Byte = 16Dim returnS As StringDim shang As ByteDim yushu(1 To 3) As ByteDim i As Bytei =

2016-04-28 17:33:22 774

原创 十进制转为二进制

打开VB软件,在command中进行编译,程序如下:当n=23时,Private Sub Command1_Click()Dim n As Byten = 23Const er As Byte = 2Dim returnS As StringDim shang As ByteDim yushu(1 To 5) As ByteDim i As Bytei =

2016-04-28 16:58:58 455

原创 乘法:n对2

打开软件选择一个command和两个text,之后再command下进行一系列的编译Private Sub Command1_Click()Dim c1 As ByteDim c2 As ByteDim a() As ByteDim b As StringDim changdu As Long, i As Longchangdu = Len(Text

2016-04-21 17:41:36 294

原创 两位数乘一位数

打开VB软件进行编译,如下图所示:下图为两位数乘一位数运行结果为:一位数乘一位数和上述类似,如下图所示

2016-04-14 17:21:58 294

原创 十个随机数字求和

打开VB软件在工程一中的form1中进行在工具箱中找到commandbutton在form1中建立command1在command1中进行编译,双击command1打开编译窗口在通用中编译Dim sum As IntegerDim i As IntegerDim a As Integer在command1中编译第一种:Private Sub

2016-04-09 22:14:37 930

原创 随机出数并排列

Option Base 1Private 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 264

原创 排15个数

Option Base 1Private 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 258

原创 对VB的感想

一开始感觉这门课很难,感觉一些东西很难学,因为之前有一些东西从未接触过,而且老多专有名词看不懂,后来随着学习,逐渐懂得了一点,当做出老师上课教的一些程序,心中还蛮有成就感的。不过VB真的不好学,好复杂。

2016-03-28 14:12:33 314

原创 比较15个数的大小1

在command1中编辑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 Integer

2016-03-24 17:43:25 230

原创 比较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 293

原创 比较两个数大小

比较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 368

空空如也

空空如也

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

TA关注的人

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