- 博客(17)
- 收藏
- 关注
原创 随机生成十个数
Private Sub Command1_Click()Dim a(10) As IntegerDim mystr As StringDim printstr As Stringa(i) = Int(Rnd() * 100 + 1)printstr = Str(a(1))mystr = "要"For i = 2 To 10t = Int(Rnd() * 100 +
2012-05-15 12:42:08 494
原创 判断整除并求和
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-04-25 21:34:21 214
原创 素数
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 = a + b b =
2012-04-25 21:32:56 303
原创 摄氏度温标与华氏度温标的转换
Option ExplicitPrivate Sub Command1_Click()If Trim(Text1.Text) = "" Then Text1.Text = "0"Label3.Caption = TransTh(Val(Text1.Text), True)Label4.Caption = "摄氏度"Label5.Caption = "华氏度"End Sub
2012-04-25 21:31:42 650
原创 十个数显示其中最大数
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 iEnd FunctionPriv
2012-04-25 21:27:21 277
原创 三个数显示其中最大数
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 Thenmax = aElsemax = bEn
2012-04-25 21:26:04 1936
原创 两个数显示其中较大的数
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-04-25 21:24:43 521
原创 计算纳税金额
计算纳税金额 代码如下 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
2012-04-25 07:33:04 403
原创 计算出生的星期程序
计算出生的星期程序 代码如下 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 =
2012-04-25 07:32:07 251
原创 两个无限位数相乘
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 Number2() As Byte
2012-03-28 11:23:19 441
原创 随机数
Private Sub command1_Click Dim mas stringDim n as stringM=Val(Text1.Text)n=Val(Text1.Text) Text3.Text=m+Int(Rnd*(n-m+1)) End Sup
2012-03-27 21:58:49 180
原创 大小写转化
Dim x as string Private Sub form _load() X=Text1.Text End SupPrivate Sub command1_Click Text1.Text=Ucase(x) End Sup P
2012-03-27 21:57:45 264
原创 显示各位数
Dim stuname as string Dim Maths As Integer ,Eng ASinteger , s Integer Private Sub command1_Click Stuname=InputBox Maths= InputBox Eng= InputBox
2012-03-27 21:56:43 232
原创 编程的收获
今天第一节编程课,我认识了老师您。很喜欢您的幽默诙谐!感谢您!今天上了第一节编程课,我第一次了解了它!真正知道了它的困难。而且有了巨大的收获。我知道了编程的过程,第一次用自己输入的程序计算出了结果,我有一种极大的满足,与深深的自豪!在一次次的纠正过程中,我不断的发现自己的不足之处,我知道了细节的重要性。在以后的学习中我以最大的热情去对待它。我相信我会成功!这是程序:Option Expli
2012-03-27 21:55:17 545
原创 single(单精度型)和double(双精度型)
单精度型Single 存储有符号的 IEEE 32 位(4 个字节)单精度浮点数, 负数取值范围为 -3.4028235E+38 到 -1.401298E-45, 正数取值范围为 1.401298E-45 到 3.4028235E+38。 单精度数值存储实数数值的近似值。 双精度型Double 存储带符号的 IEEE 64 位(8 个字节)双精度浮点数, 负值取值范围为 -1.797693
2012-03-27 21:54:06 31612
原创 动作图片设计程序
Public TopBottom, LeftRight As StringPrivate Sub Form_Click()If Timer1.Enabled = False ThenTimer1.Enabled = TrueElseTimer1.Enabled = FalseEnd IfEnd SubPrivate Sub Form_KeyPress(KeyAsci
2012-03-27 21:53:04 296
原创 随机图形
Private Sub Command1_Click()Timer1.Enabled = TrueTimer1.Interval = 100End SubPrivate Sub Command2_Click()Form1.ClsEnd SubPrivate Sub Command3_Click()Timer1 = FalseEnd SubPrivate Su
2012-03-27 21:40:10 283
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人