题型:综合题 题类:常考题 难易度:困难
浙江省杭州市七校2015-2016学年高二下学期期中考试信息技术试题
1图 | 2图 |
Private Sub Command1_Click()
Dim s As Single, x As Single, n As Integer, i As Integer
Randomize
List1.Clear
s =
n = Val(Text2.Text)
For i = 1 To n - 1 '通过循环语句产生n-1个红包的随机值
x = Int((Rnd() * s / () + 0.005) * 100) / 100
List1.AddItem Str(x)
s =
Next i
x = Int((s + 0.005) * 100) / 100 '产生最后一个红包
List1.AddItem Str (x)
End Sub
试题篮