'复制下面代码到题目区,即可使用

'调用方法:msgbox YunSuanFuhao

Private Function YunSuanFuhao()
Select Case CInt(SuiJiShu(1, 4))
Case 2
YunSuanFuhao = "-"
Case 3
YunSuanFuhao = "×"
Case 4
YunSuanFuhao = "÷"
Case Else
YunSuanFuhao = "+"
End Select
End Function

'下面是随机数字函数

Private Function SuiJiShu(FromNum, ToNum)
suijii = 0
FromNum = Abs(FromNum)
ToNum = Abs(ToNum)
If FromNum = ToNum Then SuiJiShu = FromNum: Exit Function
If FromNum > ToNum Then
suijii = FromNum
FromNum = ToNum
ToNum = suijii
End If

suijii = 0
Randomize
On Error Resume Next
SuiJiShu = CSng((ToNum - FromNum + 1) * Rnd + 1)
SuiJiShu = FormatNumber(SuiJiShu, 2, , , 0) '保留小数点后2位
End Function