更多"在窗体上画一个名称为command1的命令按钮,然后编写如下程序; "的相关试题:
[单项选择]在窗体上画一个名为Command 1的命令按钮,然后编写如下程序:
Option Base 1
Private Sub Command1_Click( )
Dim Arr
Arr=Array(1, 2, 3, 4, 5)
j=1
For i=5 To 1 Step -1
S=S+Arr(i)*j
j=j*10
Next
Print S
End Sub
程序运行后,单击命令按钮,输出结果为( )。
A. 54321
B. 123
C. 12345
D. 345
[单项选择]在窗体上画一个名为Command1的命令按钮,然后编写如下代码:
Option Base 1
Private Sub Command1_Click( )
Dim a
a=Array(1,2,3,4)
j=1
For i=3 To 1 Step-1
s=s+a(i)*j
j=j*10
Next i
Print s
End Sub
运行上面的程序,其输出结果是
A. 1234
B. 12
C. 34
D. 4321
[单项选择]在窗体上画一个名为Command1的命令按钮,然后编写如下程序:
Option Base 1
Private Sub Command1_Click( )
Dim Arr
Arr = Array(1,2,3,4,5)
j=1
For i = 5 To 1 Step -1
S = S + Art(i) * j
j =j * 10
Next
Print S
End Sub
程序运行后,单击命令按钮,输出结果为( )。
A. 54321
B. 123
C. 12345
D. 345
[单项选择]在窗体上画一个名为Command1的命令按钮,然后编写下列程序:
Option Base 1
Private Sub Command1_Click( )
Dim Arr
Arr=Array(1,2,3,4,5)
j=1
For i=5 To 1 Step-1
S=S+Arr(i)*j
j=j*10
Next
Print S
End Sub
程序运行后,单击命令按钮,输出结果是( )。
A. 54321
B. 123
C. 12345
D. 345
[单项选择]在窗体上画一个名为Command1的命令按钮,然后编写如下代码:
Option Base 1
Private Sub Command1_Click( )
Dim a
a=Array(2,4,6,8)
j=1
Fori=4 To 1 Step-1
s=s+a(i)*j
j=j*10
Next i
Print s
End Sub
运行上面的程序,其输出结果是______。
A. 24
B. 68
C. 2468
D. 8642
[填空题]在窗体上画一个命令按钮,其名称为command1,然后编写如下代码:
Option Base 1
Private Sub Command1_ Click( )
Dim Arr
Arr = Array(43, 68f -25, 65, -78, 12, -79, 43, -94, 72)
pos = 0
neg = 0
For k = 1 To 10
If Art(k) > 0 Then
Else
End If
Next k
Print pos, neg
End Sub
以上程序的功能是,计算并输出数组Arr中10个数的整数之和pos与负数之和neg,请填空。
[单项选择]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序:
Option Base 1
Private Sub Command1_Click( )
Dim a As Variant
a=Array(1,2,3,4)
j=1
For i=4 To 1 Step-1
s=s+a(i)*j
j=j*10
Next i
Print s
End Sub
运行上面的程序,单击命令按钮,其输出结果是______。
A. 4321
B. 12
C. 34
D. 1234
[单项选择]在窗体上画一个命令按钮,其名称为Command1,然后编写如下代码:
Option Base 1
Private Sub Command1_Click( )
Dim a
a=Array(1,2,3,4)
j=1
Fori=4 To 1 Step-1
s=s+a(i)*j
j*10
Next i
Print s
End Sub
程序运行后,单击命令按钮,其输出结果是______。
A. 12
B. 34
C. 1234
D. 4321