试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省共美联盟2018-2019学年高二下学期信息技术期末模拟联考试卷
For i=1 to n
⑴ Next i
For i=1 to n-1 k=i
For j=i+1 To n
If ⑵ Then k=j Next j
If k <> i Then
⑶ End if
Next i
上述程序段3个方框处的代码分别为( )
右框内划线处的内容可以是( )
PRIVATE SUB FORM_CLICK
DIM A(4,4) AS INTEGER
FOR I = 1 TO 4
FOR J= 1 TO 4
IF {#blank#}1{#/blank#}
A(I,J)=1
{#blank#}2{#/blank#}
A(I,J)=0
END IF
PRINT A(I,j);
{#blank#}3{#/blank#}
PRINT
{#blank#}4{#/blank#}
END SUB
PRIVATE SUB FORMCLICK
FOR I = 3 TO {#blank#}1{#/blank#}
F=0
FOR J= 2 TO I-1
IF {#blank#}2{#/blank#} THEN
F=1
EXIT FOR
NEXT J
IF F=0 THEN {#blank#}3{#/blank#}
s=Text 1.Text:n=0:f=False
For i=1 To Len(s)
ch=Mid(s,i,1)
If ch>="0" And ch<="9" Then
If Not f Then
f=True:n=n+1
End If
Else
f=False
运行该程序段后,在文本框Text 1中输入“13+(123-23) *2”则变量n的值为( )
试题篮