- 博客(11)
- 收藏
- 关注
原创 判断整除并求和
代码:Private Sub Command1_Click()Dim m As Integer, n As Integer, d As IntegerDim s As Longm = Val(Text1.Text)n = Val(Text2.Text)d = Val(Text3.Text)s = 0Sum m, n, d, sLabel4.Caption = m
2012-05-22 20:40:07 315
原创 判断并输出1000到2000之间能同被17和37整除的的数
代码:Private Sub Command1_Click() Dim A As IntegerA = val(Text1.Text)If A Mod 17 = 0 Then If A Mod 37 = 0 Then Label3.Caption = "此数可以同时被17和37整除" Else L
2012-05-22 20:33:24 1624
原创 用vb程序输出10个随机数
代码:Private Sub Command1_Click()Dim i As Integer, t As IntegerDim k As IntegerDim a(10) As IntegerDim mystr As StringDim youstr As String a(1) = Int(Rnd * 100 + 1) mystr = "要"
2012-05-22 20:26:40 2775
原创 判断10个数大小
代码:Private Function max(a() As Integer) As IntegerDim i As IntegerDim maxa As IntegerFor i = LBound(a) To UBound(a)If a(i) > maxa Thenmaxa = a(i)max = maxaEnd IfNext i
2012-05-22 20:21:02 622
原创 比较三个数大小
代码:Private Sub Command1_Click()Dim a As Integer, b As Integer, c As IntegerDim max As Integera = Val(Text1.Text)b = Val(Text2.Text)c = Val(Text3.Text)If a > b Then max = aE
2012-05-22 20:15:30 299
原创 比较两个数大小
代码:Private Sub Command1_Click()Dim a As Integer, b As Integera = Val(Text1.Text)b = Val(Text2.Text)If a > b ThenLabel3.Caption = aElseLabel3.Caption = bEnd IfEnd Sub 心得
2012-05-22 20:12:14 714
原创 设计vb程序计算税率
代码:Private Sub Command1_Click()Dim n As Single, w As SingleDim s As Single, m As Singlen = Val(Text1.Text)w = n - 500Select Case w Case Is s = 0.05 Case Iw
2012-05-22 20:07:32 805
原创 计算出生是星期几
代码:Private Sub Command1_Click()Dim Year As IntegerDim Month As IntegerDim Day As IntegerDim Birthday As DateDim N As IntegerYear = Int(Val(Text1.Text))Month = Int(Val(Text2.Text))D
2012-05-22 19:57:51 492
原创 两个多位数相乘
代码:Option Base 1Private Sub Command1_Click() Dim M As String Dim N As String M = Trim(Text1.Text) N = Trim(Text2.Text) Dim Number1() As Byte Dim Number2()
2012-05-22 19:50:35 408
原创 用vb程序设计输出100以内素数和
代码:Private Function Judge()Dim b As Integerb = b / 1 * bEnd FunctionPrivate Sub Command1_Click() Dim a As Integer, b As Integer Show a = 0: b = 1 If Judge(b Do a =
2012-05-22 19:38:08 9506
原创 用vb程序设计动画
代码:Public TopBottom, LeftRight As StringPrivate Sub Form_Click() If Timer1.Enabled = False Then Timer1.Enabled = True Else Timer1.Enabled = False End IfEnd S
2012-05-22 19:22:33 944
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人