- 博客(19)
- 收藏
- 关注
原创 n个数乘一个数
Private Sub Command1_Click() Cls Dim a() As Byte Dim b As String Dim c As Byte Dim c1 As Byte Dim c2 As Byte Dim i As Long, changdu As Long changdu = Len(Text1.Text) ReDim a(changdu)
2016-06-23 11:17:11
307
原创 VB中输入个人信息并保存成文档形式
Private Type studentname As String * 3stuNo As String * 11sex As Booleanage As Byteprof As String * 2grade As SingleEnd TypePrivate Sub Command1_Click()Dim qizhenhao As studentqi
2016-06-16 17:25:55
287
原创 VB中设置登陆界面的代码
Option ExplicitConst MaxLoginTimes As Integer = 3Private Sub cmdLogin_Click() Static loginTimes As Integer loginTimes = loginTimes + 1If loginTimes On Error GoTo ppp Dim Cn
2016-06-16 17:24:30
3302
原创 鞍点的制作 K=m+1
实验名称:找出鞍点程序思想:首先生成五行六列的数(在1~100之间)这一步是通过循环实现的,即分别定义i,j,通过循环生成二维数组。第二步,也是较为关键的一步,即找出每一行的最大值并标记,这一步又是怎样实现的呢?很简单,也是通过循环,还记得比较几个数大小的方法吗?其实方法类似,假设a>b,只不过在这里如果为假我们并不交换两个数,而是如果a>b
2016-06-16 17:22:20
282
原创 冒泡法排序
Private Sub Command1_Click()Dim a(10) As IntegerDim i As IntegerDim j As IntegerFor i = 1 To 10a(i) = 10 + Int(Rnd() * 1000)Print a(i);Next iPrintFor i = 1 To 9For j = 1 To 10 - i
2016-05-12 17:40:52
256
原创 选择法排序
Private Sub Command1_Click() 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 Dim j As Integer
2016-05-07 17:50:16
245
原创 16 进制 郑明雨 15050341044
Private Sub Command1_Click() Me.Font.Size = 30 Dim a As IntegerDim b As IntegerDim s As StringDim yushu As Byte a = 1230: b = 16 While a yushu = a Mod b
2016-05-07 17:27:56
346
原创 二进制 230
Private Sub Command1_Click() Me.Font.Size = 60 Print erjinzhi(230)End SubPrivate Function erjinzhi(m As Byte) As String Dim n As Byte n = m Const er As Byte = 2 Dim
2016-04-28 16:57:07
262
原创 二进制 120
Private Sub Command1_Click() Me.Font.Size = 60 Print erjinzhi(120)End SubPrivate Function erjinzhi(m As Byte) As String Dim n As Byte n = m Const er As Byte = 2 Dim
2016-04-28 16:56:27
419
原创 一位数乘一位数
Private Sub Command1_Click()Dim 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.Text))tempresult = n
2016-04-21 17:38:29
299
原创 n个数乘一个数 15电气一班 郑明雨 15050341044
Private Sub Command1_Click()ClsDim a() As ByteDim b As StringDim c As ByteDim c1 As ByteDim c2 As ByteDim i As Long, changdu As Longchangdu = Len(Text1.Text)ReDim a(changdu)For i =
2016-04-21 17:19:42
322
原创 余数和商 两位数乘一位数
Private Sub Command1_Click() Me.Font.Size = 70 Dim n1() As Byte, n1Len As Long Dim n2() As Byte, n2Len As Long Dim yushu1 As Byte, yushu2 As Byte Dim shang As Byte Dim i
2016-04-14 17:26:26
271
原创 余数和商 一位数乘一位数
Private Sub Command1_Click()Dim n1 As ByteDim n2 As ByteDim yushu As ByteDim shang As ByteDim tempresult As Byten1 = Int(Val(Me.Text1.Text))n2 = Int(Val(Me.Text2.Text))tempresult = n1
2016-04-14 16:54:24
237
原创 十个随机数求和 1044 郑明雨
1.Option ExplicitPrivate Sub Command1_Click()ClsDim i As Integer, Sum As IntegerDim a(10) As IntegerRandomizeFor i = 1 To 10a(i) = Int(Rnd * 1000) + 1Sum = Sum + a(i)Next iPrint
2016-04-14 16:53:37
271
原创 15电气郑明雨
在窗体中双击“排序最小的数”,并在弹出的对话框中输入代码:Private Sub Command1_Click()ClsDim n As IntegerDim wzs(10) As IntegerDim swap As Integern = 1While n wzs(n) = Int(Rnd * 1000)n = n + 1Wendn = 1
2016-03-31 17:40:31
366
原创 15电气郑明雨
2.在窗体的适当位置创建一个commandbutton,并在其属性窗口中将caption改为“生成数”。3.在窗体中双击“生成数”,并在弹出的对话框中输入代码。代码如下:Private Sub Command1_Click()ClsDim n As IntegerDim wzs(10) As Integern = 1While n wzs(n) = Int(Rn
2016-03-31 17:35:11
334
原创 15电气一班郑明雨 1044 作业
Option Base 1Private Sub Command1_Click()ClsFont.size = 30Dim a As IntegerDim sierdun(15) As Integern = 1While n sierdun(n) = Int(Rnd * 1000) n = n + 1WendDim swap
2016-03-31 17:18:55
344
原创 15电气郑明雨作业2
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 18:57:44
355
原创 15电气郑明雨作业1
Private Sub Command1_Click()Dim s As StringDim s As LoadPictureColorConstantss = Label1.CaptionLabel1.Caption = Label2.CaptionLabel2.Caption = sa = Label1.ForeColorLabel1.ForeColor = Lab
2016-03-24 18:57:07
411
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人