网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程:
Private Sub Command1_Click()
Dim i As Integer, x As Integer
For i = 1 To 6
If i = 1 Then x = i
If i <= 4 Then
x = x + 1
Else
x = x + 2
End If
Next i
Print x
End Sub
程序运行后,单击命令按钮,其输出结果为( )。
A.9
B.6
C.12
D.15
参考答案
更多 “ 在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程:Private Sub Command1_Click()Dim i As Integer, x As IntegerFor i = 1 To 6If i = 1 Then x = iIf i = 4 Thenx = x + 1Elsex = x + 2End IfNext iPrint xEnd Sub程序运行后,单击命令按钮,其输出结果为( )。A.9B.6C.12D.15 ” 相关考题
考题
在窗件上画一个命令按钮,其名称为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() 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 = 12345Print Format$(a, "000.00")End Sub程序运行后,单击命令按钮,窗体上显示的是( )。A.123.45B.12345.00C.12345D.00123.45
热门标签
最新试卷