在窗体上画1个命令按钮,其名称为Command1,然后编写如下程序:Private Sub Command1_Click()Dim a(10)As IntegerDim x As IntegerFor i=1 To 10a(i)=8+iNextx=2Print a(f(x)+x)End SubFunction f(x As Integer)x=x+3f=xEnd Function程序运行后,单击命令按钮,输出结果为( )。A.12B.15C.17D.18

在窗体上画1个命令按钮,其名称为Command1,然后编写如下程序:

Private Sub Command1_Click()

Dim a(10)As Integer

Dim x As Integer

For i=1 To 10

a(i)=8+i

Next

x=2

Print a(f(x)+x)

End Sub

Function f(x As Integer)

x=x+3

f=x

End Function

程序运行后,单击命令按钮,输出结果为( )。

A.12

B.15

C.17

D.18


相关考题:

在窗件上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click() a=12345 Print Format S(a, "000. 00") End Sub 程序运行后,单击命令按钮,窗体上显示的是______。A.123.45B.12345.00C.12345D.00123.45

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() a S="VisualBasic" Print String(3, a$) End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是______。A.VVVB.VisC.sicD.11

(7)在窗体上画一个命令按钮,其名称为 Command1,然后编写如下事件过程:Private Sub Command1_Click( )a$="National Computer Rank Examination"n=Len(a$)s=0For i=1 To nb$=Mid(a$, i, 1)If b$="n" Thens=s+1End IfNext iPrint sEnd Sub程序运行后,单击命令按钮,输出结果是 【7】 。

在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序:Private Sub Command1_Click()Dim a(10)As IntegerDim x As IntegerFor i=1 To 10a(i)=iNext ix=1MsgBoxa(f(x)+x)End SubFunction f(y As Integer)y=y+2f=yEnd Function程序运行后,单击命令按钮,消息框的输出结果为______。

在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click() x=-5 If Sgn(x) Then y=Sgn(x^2) Else y=Sgn(x) End If Print y End Sub 程序运行后,单击命令按钮,其输出结果为 ______。A.-5B.25C.-1D.1

在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click( ) a=12345 Print Format $(a,"000.00") End Sub 程序运行后,单击命令按钮,窗体上显示的是A.123.45B.12345.00C.12345D.00123.45

在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_ Click() Dim arr (10) For i = 1 To 10 arr (i) = i ^ 2 Next i Print arr(i - 2) End Sub程序运行后,单击命令按钮,在窗体上输出的是______。A.49B.64C.81D.100

在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click() a = 12345 Print Format$(a, "000.00") End Sub 程序运行后,单击命令按钮,窗体上显示的是A. 123.45B.12345.00C.12345D.00123.45

在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click() a=12345 Print Format$(a,"000,00") End Sub 程序运行后,单击命令按钮,窗体上显示的是( )。A.123.45B.12345.00C.12345D.00123.45

在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程:Private Sub Command1_Click()a = 12345Print Format$(a, "000.00")End Sub程序运行后,单击命令按钮,窗体上显示的是( )。A.123.45B.12345.00C.12345D.00123.45