展开全部
Private Sub Command1_Click()
Dim a, b, c As Integer
Dim max
Randomize
a = Int(900 * Rnd + 100)
b = Int(900 * Rnd + 100)
c = Int(900 * Rnd + 100)
Print a, b, c
max = a
If b > max Then max = b
If c > max Then max = c
Print "最大数是"; max
End Sub
Private Sub Command1_Click()
Dim a As Integer
a = Val(InputBox("输入一个整数"))
If a Mod 3 = 0 And a Mod 5 = 0 And a Mod 7 = 0 Then
MsgBox a & "能够被3、5、7整除"
Else
MsgBox a & "不能被3、5、7整除"
End If
End Sub
Dim a, b, c As Integer
Dim max
Randomize
a = Int(900 * Rnd + 100)
b = Int(900 * Rnd + 100)
c = Int(900 * Rnd + 100)
Print a, b, c
max = a
If b > max Then max = b
If c > max Then max = c
Print "最大数是"; max
End Sub
Private Sub Command1_Click()
Dim a As Integer
a = Val(InputBox("输入一个整数"))
If a Mod 3 = 0 And a Mod 5 = 0 And a Mod 7 = 0 Then
MsgBox a & "能够被3、5、7整除"
Else
MsgBox a & "不能被3、5、7整除"
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询