A: Dim num
B:
C: Dim num$
D: Dim num!
E: Dim num%
举一反三
- 下列变量名定义正确的是( )。 A: dim B: 1_s C: fac D: _num
- 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,输出结果为:( )
- 中国大学MOOC: 在窗体上添加一个命令按钮Command1,然后编写如下事件过程:Private Sub Command1_Click() Dim num As Integer num = 1 Do Until num > 6 Print num; num = num + 2.4 LoopEnd Sub程序运行后,单击命令按钮,则窗体上显示的内容是( )。
- 下面哪个定义了一个整型变量x A: Dim x As Single B: Dim x As Integer
- 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程Private Sub Command1____Click()Dim num As Integernum = 1Do Until num > 6num = num + 2LoopPrint num;End Sub程序运行后,单击命令按钮,则窗体上显示的内容是:____
内容
- 0
定义整型数组num,有两个元素,这个数组的第二个元素是: A: num(2) B: num(1) C: num[1] D: num[2]
- 1
下面可以正确定义2个整型变量和1个字符串变量的语句是? A: Dim n, m As Interger, s As String B: Dim a%, b $ , c As String C: Dim a As Integer, b, c As String D: Dim x%, y As Integer, z As String
- 2
下面可以正确定义2个整型变量和1个字符串变量的语句是【 】 A: Dim n,m As Integer,s As String B: Dim a%,b$,c As String C: Dim a As Integer,b,c As String D: Dim x%,y As Integer,z As Suing
- 3
下面可以正确定义两个整型变量和—个字符串变量的语句是()。 A: Dim n,m As Integer,s As String B: Dim a%,b$,c As String C: Dim a As Integer,b,c As String D: Dim x%,y As Integer,z As String
- 4
在窗体上画—个名称为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.无数据输出