单项选择题

以下程序段运行的结果是 ______。 Dim a(-1 To 5)As Boolean Dim flag As Boolean flag=False Dim i As Integer Dim j As Integer Do Until flag=True For i=-1 To 5 j=j+1 If a(i)=False Then a(i)=True Exit For End If If i=5 Then flag=True End If Next Loop Print j

A.20
B.7
C.35
D.8
<上一题 目录 下一题>
热门 试题

单项选择题
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(ByVal x As Integer,y As Integer) y=x*y If y>0 Then Func=x Else Func=y End If End Function Private Sub Command1_Click() Dim a As Integer,b As Integer a=3 b=4 c=Func(a,B) Print a= ;a Print=b= ;b Print c= ;c End Sub 程序运行后,单击命令按钮,其输出结果为 ______。
A.a=3 b=12 c=3
B.a=3 b=4 c=3
C.a=3 b=4 c=12
D.a=13 b=12 c=12
单项选择题
在设计程序时,应采纳的原则之一是 ______。
A.程序结构应有助于读者理解
B.不限制goto语句的使用
C.减少或取消注解行
D.程序越短越好
相关试题
  • 下列程序段的执行结果为 ______。 ...
  • 下列程序段的结果为 ______。 A=...
  • 以下叙述不正确的是 ______。
  • 在下列几种排序方法中,要求内存量最大的是...
  • 系统符号常量的定义可以通过 ______...