中国大学MOOC: 在窗体上添加一个命令按钮Command1,然后编写如下事件过程:Private Sub Command1_Click() Dim num As Integer num = 1 Do Until num > 6 Print num; num = num + 2.4 LoopEnd Sub程序运行后,单击命令按钮,则窗体上显示的内容是( )。
举一反三
- 在窗体上画—个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim num As Integer num=1 DO Until num>6 Print num; num=num+2.4 Loop End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是 ______。 A.13.45.8 B.1 3 5 C.1 4 7 D.无数据输出
- 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程Private Sub Command1____Click()Dim num As Integernum = 1Do Until num > 6num = num + 2LoopPrint num;End Sub程序运行后,单击命令按钮,则窗体上显示的内容是:____
- 中国大学MOOC: 在窗体上添加一个命令按钮Command1,然后编写如下事件过程:Private Sub Command1_Click() Dim a As Integer, s As Integer a = 8 s = 1 Do s = s + a a = a - 1 Loop While a <= 0 Print s; aEnd Sub程序运行后,单击命令按钮,则窗体上显示的内容是( )。
- Function fun(ByVal num As Long) As Long Dim k As Long k = 1 num = Abs(num) Do While num k = k * (num Mod 10) num = num \ 10 Loop fun = k End Function Private Sub command1_click() Dim n As Long, r As Long n = Val(InputBox("请输入一个数:")) r = fun(n) Print r End Sub 程序运行后,单击命令按钮,输入1234,输出结果为:( )
- 在窗体上添加一个命令按钮Command1,然后编写如下事件过程: Option Base 0 Private Sub Command1_Click() Dim city As Variant city = Array(" 北京 ", " 上海 ", " 天津 ", " 重庆 ") Print city(1) End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。