题型:单选题 题类:常考题 难易度:普通
浙江省稽阳联谊学校2020届高三上学期信息技术12月联考试卷
Dim a(1 To 10) As Integer, f(1 To 20) As Boolean
'f数组各元素的初值设为False,代码略
For i = 1 To 10
t =int(rnd()*20+1)
If Not f(t) Then
a(i) = t: ⑴
For j = i To 2 Step -1
If ⑵ Then
tmp = a(j): a(j) = a(j - 1): a(j - 1) = tmp
End If
Next j
Else
⑶
End If
Next i
上述程序中3处下划线应填入的程序代码是( )
Private Sub Command1Click() Dim y As Integer '用于存储输入的十进制自然数 Dim s As String '用于存储转换后的结果 Dim r As Integer n = Val(Text1.Text) s = "" Do While n <> 0 r = ① '采用除八取余法 s = Str(r) + s '将余数添加到结果s中 n = n \ 8 Loop Label1.caption=s End Sub |
请根据题意将程序补充完整。
试题篮