题型:综合题 题类:常考题 难易度:困难
浙江省宁波市北仑中学2018-2019学年高二上学期信息技术期初返校考试试卷
Private Sub Command1_Click()
Dim r As Integer, k1 As Integer, k2 As Integer, r As Integer
Dim s As String, n As Integer
'从文本框TxtIn中获取字符串
Randomize
r = Int(Rnd() * 10) + 1 '随机生成洗牌次数
n = Len(s)
Do While r >= 1 '洗牌操作
k1 = Int(Rnd() * (n - 2)) + 2
k2 = Int(Rnd() * (n - k1 + 1)) + k1
s = + Mid(s, 1, k1 - 1) + Mid(s, k2 + 1, n - k2)
r = r - 1
Loop
'输出结果
End Sub
试题篮