(121 KB, 下载次数: 114)
PPT实现随机两位数加法
寻梦 发表于: 2008-3-22 19:58 来源: 扑奔PPT网
100以内的随机两位数加法运算!此代码由如风老师编写!
大家对 PPT实现随机两位数加法 的评论
最新PPT模板
最新贴子
PPT热贴
寻梦 发表于: 2008-3-22 19:58 来源: 扑奔PPT网
(121 KB, 下载次数: 114)
Dim a1, a2, a3, a4, a5
Private Sub CommandButton1_Click()
a1 = Int(100 * Rnd)
a2 = Int(100 * Rnd)
a4 = "太棒了!"
a5 = "再想想吧!"
TextBox1.Value = a1
TextBox2.Value = a2
TextBox3.Value = a3
Label1.Caption = ""
End Sub
Private Sub CommandButton2_Click()
If Int(TextBox3.Value) = a1 + a2 Then
Label1.Caption = a4
Else
Label1.Caption = a5
End If
End Sub
Private Sub CommandButton3_Click()
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Text = ""
Label1.Caption = ""
End Sub
随机两位数加法1.png
18.2 KB, 下载次数: 47)
Private Sub CommandButton1_Click()
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
Label1.Caption = ""
a1 = Int(100 * Rnd)
a2 = Int(100 * Rnd)
TextBox1.Value = a1
TextBox2.Value = a2
End Sub
Private Sub CommandButton2_Click()
If Int(TextBox3.Value) = a1 + a2 Then
Label1.Caption = "太棒了!"
Else
Label1.Caption = "再想想吧!"
End If
End Sub
连清空按纽也不要了,哈哈,我测试成功!
[ 本帖最后由 lcyjxjs 于 2008-3-23 10:13 编辑 ]
两位数加法(如风).jpg
121 KB, 下载次数: 30)
我下来看看