- 博客(25)
- 收藏
- 关注
原创 鞍点
Option Base 1Dim anma() As IntegerDim m As IntegerPrivate Sub Command1_Click() Dim i As Byte, j As Byte For i = 1 To m For j = 1 To n Print anma(i, j); Spc(3)
2016-06-02 17:47:17
268
原创 登陆页面的制作
一思路登陆—Form-frmloginStart up Position=2账号—Lable TextBox—txtUserID密码—Lable TextBox—txtPassword登陆,取消—CommangButton Cmdlogin-default:ture-ENTERCmd Cancel-Cancel:ture-Esc字体:大小:小一所有控件的Ta
2016-05-26 18:07:39
705
原创 s
Private Sub Form_Load()Type student name As String stuno As String sex As Boolean age As Byte prof As String grade As SingleEnd TypeDim zhangbowen As stuentzhan
2016-05-12 18:15:43
232
原创 选择法排序
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 18:13:46
413
原创 2138的16进制简单的
Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim s As StringDim yushu As Integera = 2138: b = 16While a yushu = a Mod b s = f(yushu) & s a = a \ bWendPri
2016-05-07 17:17:41
265
原创 将2138的16进制
Private Sub Command1_Click()Me.Font.Size = 50Print shiliujinzhi(2138)End SubPrivate Function shiliujinzhi(m As Integer) As StringDim n As Integer n = mConst shiliu As Byte = 16Dim r
2016-05-07 17:02:04
236
原创 十进制转化为二进制230
Private Sub Command1_Click()Me.Font.Size = 30Print erjinzhi(230)End SubPrivate Function erjinzhi(m As Byte) As StringDim n As Byten = mConst er As Byte = 2Dim returns As StringDim sh
2016-04-28 16:51:54
878
原创 十进制转换为二进制23
Private Sub Command1_Click()Me.Font.Size = 30Dim n As Byten = 23Const er As Byte = 2Dim shang As ByteDim yushu(1 To 5) As ByteDim i As Bytei = 5shang = n \ eryushu(i) = n Mod erW
2016-04-28 16:32:02
955
原创 三位数乘一位数
Option Base 1Private 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, yushu3 As Integ
2016-04-21 17:30:55
301
原创 两位数乘一位数
Option Base 1Private 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 A
2016-04-21 17:29:58
244
原创 n位数乘1位数
Private Sub Command1_Click()Dim c As ByteDim a() As ByteDim b As StringDim changdu As Integer, i As Longchangdu = Len(Text1.Text)ReDim a(changdu)For i = 1 To changdub = Mid(Me.Text1.
2016-04-21 17:28:54
256
原创 n乘1
Private Sub Command1_Click()ClsDim a() As ByteDim r() As ByteDim b As StringDim c As ByteDim i As LongDim l As Longl = Len(Me.Text1.Text)ReDim a(l)For i = 1 To l b = Mid(Me.Te
2016-04-21 17:18:28
374
原创 1*1 1的相乘
Private Sub Command1_Click()Dim a As ByteDim b As ByteDim c As ByteDim r As Byteb = Me.Text1.Texta = Int(Val(b))b = Me.Text2.Textc = Int(Val(b))r = a * cPrint rEnd Sub
2016-04-21 17:04:15
535
原创 红糖水白糖水交换
Private Sub 变换_Click()Dim a As Stringa = Me.Label1.CaptionMe.Label1.Caption = Me.Label2.CaptionMe.Label2.Caption = aDim b As Stringb = Me.Label1.ForeColorMe.Label1.ForeColor = Me.Label2.
2016-04-14 17:37:56
210
原创 比较大小
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 = Int(Rnd * 1000) If a
2016-04-14 17:37:01
191
原创 vb15个数字作业
Private Sub cmdSort_Click() Dim A(14) As Integer Dim I, J As Integer Dim Temp As Integer Form1.Cls Randomize For I = 0 To 14 A(I) = Int(Rnd * 1000) Print A(I); Ne
2016-04-14 17:36:02
191
原创 n个随机数的排列
Option Base 1Private Sub Command1_Click()ClsFont.size = 30Dim n As IntegerDim size As Integersize = Int(Val(Me.Text1.Text))Dim sierdun() As IntegerReDim sierdun(size) As Integern =
2016-04-14 17:34:49
301
原创 红糖水
Private Sub 变换_Click()Dim a As Stringa = Me.Label1.CaptionMe.Label1.Caption = Me.Label2.CaptionMe.Label2.Caption = aDim b As Stringb = Me.Label1.ForeColorMe.Label1.ForeColor = Me.Label2.
2016-04-14 17:33:06
221
原创 10的阶乘
Private Sub Command1_Click()Print 阶乘(10)End SubPrivate Function 阶乘(n As Integer) As LongIf n = 1 Then 阶乘 = 1 Else 阶乘 = n * 阶乘(n - 1) End If End Function
2016-04-14 17:22:15
299
原创 给十五个数排序
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-04-14 16:36:26
295
原创 九种求和方法
(一) Option ExplicitPrivate Sub Command1_Click()Dim i As IntegerDim a(10) As IntegerDim sum As IntegerRandomizeFor i = 1 To 10 a(i) = Int(Rnd * 1000) + 1 sum = sum + a
2016-04-14 16:34:33
270
原创 十一个数 最后一个数是前十个数的和
Private Sub Command1_Click()Dim a(10) As Integern = 1While n a(n) = Int(Rnd * 1000) + 1n = n + 1Wendn = 1While n Print a(n)n = n + 1Wends = 0n = 1While n s = s + a(n)n
2016-04-07 16:28:08
482
原创 排序
Private Sub Command1_Click() Dim n As Integer Dim sierdun(15) As Integer n = 1 While n sierdun(n) = Int(Rnd * 1000) n = n + 1 Wend Dim swap As Integer
2016-03-31 17:42:51
143
原创 比较ab大小
Private Sub Command1_Click()ClsMe.Font.Size = 70Dim a As Integer, b As Integera = Int(Rnd * 1000)b = Int(Rnd * 1000)If a Me.Text1.Text = "aElseEnd IfPrint a & "," & bEnd Sub
2016-03-24 17:17:53
1825
转载 三个数排序
Dim a(3) As Double, i As Integer, t As Integer For i = 1 To 3 a(i) = InputBox("请输入第" & i & "个数") Next i If a(1) < a(2) Then change2num a(1), a(2) If a(1) < a(3) Then change2num
2016-03-24 17:01:10
503
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人