【本示例为问答类题型】请将下面代码完整复制到题目区,并按F5测试,注意下面第一行前面的单引号

'本题目为自编程题目
'输出题目请赋值到timu变量,输出答案请赋值到daan变量(支持VBS语言,不要修改第一行和本行内容,按F5运行代码)

s = "": ss = "": shu1 = 0: shu2 = 0

shu1 = SuiJiShu(1000, 100000)
s = shu1

For j = 1 To 9 '可以修改9为其它数字,9为10组运行,输入15则为16组运算
ss = YunSuanFuhao
If InStr(ss, "+") Then
shu2 = SuiJiShu(1000, 10000)
shu1 = CSng(shu1) + shu2
If Right(s, 1) = ")" Then
s = Left(s, Len(s) - 1)
s = s & ss & shu2 & ")"
Else
s = s & ss & shu2
End If
End If
If InStr(ss, "-") Then
shu2 = SuiJiShu(1000, 10000)
shu1 = CSng(shu1) - shu2
If Right(s, 1) = ")" Then
s = Left(s, Len(s) - 1)
s = s & ss & shu2 & ")"
Else
s = s & ss & shu2
End If
End If
Next

timu = "您可以使用计算器对下面的四则运算进行统计,并将结果输入到答案区,结果保留2位小数(四舍五入)。" & vbCrLf & vbCrLf & s & "=?"
daan = FormatNumber(shu1, 2, -1, , 0) '保留2位小数,小于1则前面补0
If daan = "-0.00" Then daan = "0.00" '如果特别小的负数,在四舍五入后可能出现-0.00
'下面情况处理了结果可能是整数的情况,防止考生没有输入小数位数导致错误
If Right(daan, 3) = ".00" Then
daan = "Or(" & Chr(34) & daan & "," & Left(daan, Len(daan) - 3) & Chr(34) & "," & Chr(34) & Chr(34) & "," & Chr(34) & "1" & Chr(34) & ")=" & Chr(34) & Chr(34)
End If
'下面情况处理了结果可能是1位小数的情况,防止考生没有输入小数位数导致错误
If Right(daan, 1) = "0" And InStr(daan, ".") Then
daan = "Or(" & Chr(34) & daan & "," & Left(daan, Len(daan) - 1) & Chr(34) & "," & Chr(34) & Chr(34) & "," & Chr(34) & "1" & Chr(34) & ")=" & Chr(34) & Chr(34)
End If

'===========================================
Private Function YunSuanFuhao()
Select Case CInt(SuiJiShu(1, 2))
Case 1
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