试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省高中信息技术 VB基本语句同步练习
s = Text1.Text
For i = 1 To Len(s) c = Mid(s, i, 1)
s1 = s1 + c Next i Text2.Text = s1
程序运行时,在文本框Text1中输入“ABC123xyz”,在文本框Text2中输出“bcd123yza”,则加框①处的代码为( )
A.
a(1) = 1
For i = 2 To 6
Randomize
a(i) = a(i - 1) + Int(Rnd * 5 + 1)
If a(i) Mod 2 = 1 Then
a(i) = a(i) \ 2 + 1
Else
a(i) = a(i) / 2
End If
Next i
执行程序后,a数组各元素可能是( )
Dim a(1 To 6) As Integer
a=n Mod k
n=n\k,k=k+1,s=s+a
a(1) = Int(11 * Rnd) + 2
a(i) = Int(11 * Rnd) + 2
If i Mod 2 = 1 And Not prime(a(i)) Then i = i - 1
ElseIf Not prime(a(i)) Then a(i) = a(i) + a(i - 1)
'自定义函数 prime()用于判断参数是否为质数,prime(n) = True 则说明 n 为质数,否则为合数,定义函数代码略执行该程序后,a(1)~a(6)的值不.可.能.为( )
试题篮