试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省诸暨中学2018-2019学年高二上学期信息技术10月阶段性考试试卷
Dim a As Integer,b As Integer,s As Single
a=2
b=3
Label1.Caption=“s=”+“a*b”
该程序运行后,标签Label1上显示的内容是( )
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.
Dim a(1 To 6) As Integer
Randomize
a=n Mod k
n=n\k,k=k+1,s=s+a
a(1) = Int(11 * Rnd) + 2
For i = 2 To 6
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)
End If
Next i
'自定义函数 prime()用于判断参数是否为质数,prime(n) = True 则说明 n 为质数,否则为合数,定义函数代码略执行该程序后,a(1)~a(6)的值不.可.能.为( )
试题篮