- 博客(12)
- 收藏
- 关注
原创 整除程序
Private Sub Combo1_Change() End Sub Private Sub Command1_Click() Dim A As Integer A = val(Text1.Text) If A Mod 17 = 0 Then If A Mod 37 = 0 Then Label3.Caption
2012-05-22 20:44:59 423
原创 素数
Private Function Judge() Dim b As Integer b = b / 1 * b End Function Private Sub Command1_Click() Dim a As Integer, b As Integer Show a = 0: b = 1 If Judge(b Do a = a +
2012-05-22 20:43:15 180
原创 生成十个随机数
Dim a(10) As Integer Dim mystr As String Dim printstr As String a(i) = Int(Rnd() * 100 + 1) printstr = Str(a(1)) mystr = "要" For i = 2 To 10 t = Int(Rnd() * 100 + 1) For k = 1 To i - 1 If t =
2012-05-22 18:54:23 700
原创 比较十个数大小
Private Function max(a() As Integer) As Integer Dim i As Integer Dim maxa As Integer For i = LBound(a) To UBound(a) If a(i) > maxa Then maxa = a(i) max = maxa End If Next i End Function Priv
2012-05-22 18:51:15 334
原创 三个数比较
Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer Dim max As Integer a = Val(Text1.Text) b = Val(Text2.Text) c = Val(Text3.Text) If a > b Then max = a Else max = b En
2012-05-22 18:49:00 219
原创 比较两个数大小
Private Sub Command1_Click() Dim a As Integer, b As Integer a = Val(Text1.Text) b = Val(Text2.Text) If a > b Then Label3.Caption = a Else Label3.Caption = b End If End Sub 这种题简单
2012-05-22 18:46:57 399
原创 两个多位数相乘
Option Base 1 Private Sub Command1_Click() Dim M As String Dim N As String M = Trim(Text1.Text) N = Trim(Text2.Text) Dim Number1() As Byte Dim Number
2012-05-22 18:45:39 256
原创 计算纳税金额
Private Sub Command1_Click() Dim n As Single, w As Single Dim s As Single, m As Single n = Val(Text1.Text) w = n - 500 Select Case w Case Is s = 0.05 Case Iw s = 0.1
2012-05-22 18:42:30 207
原创 计算出生日期
Private Sub Command1_Click() Dim Year As Integer Dim Month As Integer Dim Day As Integer Dim Birthday As Date Dim N As Integer Year = Int(Val(Text1.Text)) Month = Int(Val(Text2.Text)) Day
2012-05-22 18:40:17 310
原创 生成随机图形
一:试验目的 1 制作随机图形 2 制作动画 二:实验内容 1先界面设置和属性设置 2编写代码 1,Private Sub Command1_Click() Timer1.Enabled = True Timer1.Interval = 100 End Sub Private Sub Command2_Click() Form1.Cls End S
2012-05-22 16:30:33 1000
原创 作业2
单精度浮点数 同义词条:单精度。 根据IEEE754国际标准,常用的浮点数有两种格式 (1) 单精度浮点数(Single) 用来表示带有小数部分的实数,一般用于科学计算。 占用4个字节(32位)存储空间,包括符号位1位,阶码8位,尾数23位。其数值范围为3.4E-38~3.4E+38,单精度浮点数最多有7位十进制有效数字,单精度浮点数的指数用“E”或“e”表示
2012-05-22 16:28:48 169
原创 第一节vb课
Option Explicit Private Sub Command1_Click() Dim M As Integer Dim N As Integer M = Int(Val(Text1.Text)) N = Int(Val(Text2.Text)) Dim TemparyValue As Integer If M TemparyValue = M M = N N =
2012-05-22 16:27:38 288
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人