单项选择题

下列程序执行后,其输出结果为 。 Dim a(5) For i=0 To 4 a(i)=i+1 m=i+1 If m=3 Then a(m-1)=a(i-2)Else a(m)=a(i) If i=2 Then a(i-1)=a(m-3) a(4)=i Print a(i); Next i

A. 1 1 1 4 4
B. 1 2 3 4 1
C. 1 2 1 4 4
D. 1 1 1 4 1
<上一题 目录 下一题>
热门 试题

单项选择题
在窗体上画一个通用对话框,其名称为CommonDialogl,然后画一个命令按钮,并编写如 Private Sub Command1_Click() CommonDialogl. Flags = vbOFNHideReadOnly CommonDialogl. Filter = All Files(*.*)|*. * |Text Files(*.txt)|*. txt CommonDialogl. FilterIndex = 1 CommonDialogl. ShowOpen MsgBox CommonDialogl. FileName End Sub 程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是
A. All Files(*.*)
B. Text Files(*.txt)
C. Batch Files(*.bat)
D. All Files(*. *)|Text Files(*.txt)
单项选择题
在VisualBasic中,要遍历一个对象集合中元素,应使用的语句是______。
A. For...Next
B. ForEach...Next
C. With...End With
D. Do...Loop
相关试题
  • 在窗体上画一个名称为 Text1的文本框和一...
  • 运行下列程序:Dim t As IntegerPrivate...
  • 数据流图的类型有 和事务型。
  • 如果在“立即”窗口中执行以下操作:a=8b...
  • 数据库三级模式体系结构的划分,有利于保持...