更多"工作站运行的重定向程序 【10】 负责对用户命令进行解释。"的相关试题:
[单项选择]窗体上有一个命令按钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是( )。
Private Sub Command1_Click( )
Dim a
a=Array(1,2,3,4,5)
For k=1 To 4
S=s+a(k)
Next k
Print s
End Sub
A. 10
B. 14
C. 15
D. 120
[单项选择]若有以下程序,当程序运行后,单击命令按钮,则输出的结果为( )。 Private Sub Command1_Click( ) Dim a%(1 To 4), b%(3 To 6), i%, s1#, s2# For i= 1 To 4 a(i) = i Next i For i=3 To 6 b(i) = i Next i s1 = Factorial (A) s2 = Factorial (B) Print "s1="; s1; "s2="; s2 End Sub Function Factorial(a( ) As Integer) Dim t#, i% t=1 For i = LBound(A) To UBound(A) t = t * a(i) Next i Factorial = t End Function
A. s1=360 s2=24
B. s1=24 s2=360
C. s1=24 s2=24
D. s1=360 s2=360
[填空题]以下程序的功能是在程序运行后,单击命令按钮,输出如下结果:
1 4 7
2 5 8
3 6 9
请完善以下程序。
Private Sub Command1_Click( )
Dim Arr(3,3)As Integer
For i=1 To 3
For j=1 To 3
Arr(i,j)= 【15】
Print Arr(i,j);
Next j
Print
NeXt i
End Sub
[填空题]以下程序的功能是:程序运行后,单击命令按钮,输出结果为:
1 4 7
2 5 8
3 6 9
请填空。
Private Sub Command1_Click( )
Dim Arr(3,3)As Integer
For i=1 To 3
For j=1 To 3
Arr(i,j)=______
Print Arr(i,j);
Next j
Print
Next i
End Sub
[填空题]下面运行程序后,单击命令按钮,输出的结果是【 】。
Private Sub Command1_Click( )
Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2#
For i=1 To 4
a(i) =i
Next i
For i=3 To 6
b(i) =i
Next i
s1=YAS(A)
s2=YAS(B)
Print"s1=";s1;"s2=";s2
End Sub
Function YAS(a( )As Integer)
Dim t#,i%
t=1
For i=LBound(A) To UBound(A)
t=t * a(i)
Next i
YAS=t
End Function
[单项选择]在SAS程序运行窗口中,用窗口命令( )或按( )键调用日志窗口,仔细观察窗口中的运行记录,程序运行是否错误
A. LOE;F3
B. LOG;F3
C. LOE;F9
D. LOG;F9
E. LOG;F8
[单项选择]在窗体上画一个命令按钮,其名称为Command1。程序运行后,单击命令按钮,输出结果为( )。
Private Sub p1(n As Integer)
For i=n To 1 Step-1
x=String(i,"*")
Print x
Next i
End Sub
Private Sub Command1_Click( )
p1(3)
End Sub
A. ***
B. *
C. *
D. ******
[单项选择]在窗体上画一个命令按钮,其名称为Command1。程序运行后,单击命令按钮,输出结果是( )。
Private Sub p1 (n As Integer)
For i=n To 1 Step=1
x=String(i, "*")
Print x
Next i
End Sub
Private Sub Command1_Click( )
p1(3)
End Sub
A. ***
B. ***
C. *
D. ******
[填空题]在窗体上画一个命令按钮,然后编写如下事件过程,程序运行后,单击命令按钮,输出结果是 【15】
Private Sub Command1_Click( )
Dim a(1 To 10)
Dim p(1 To 3)
k=5
For i = 1 To 10
a(i) = i
Next i
For i = 1 To 3
p(i) = a(i * i)
Next i
For i = 1 To 3
k=k+p(i) *2
Next i
Print k
End Sub
[单项选择]在窗体上画一个命令按钮,然后编写如下程序。运行后,单击命令按钮,输出结果为 ( )。
Private Sub Command4_Click( )
Dima As Integer,bASInteger
a=1
b=2
PrintN(a,b)
End Sub
Function N(X As Integer,yAsInteger)AsInteger
N=IIf(x>y,x,y)
End Funcfion
[单项选择]有下列程序,程序运行后单击命令按钮,则输出的结果是( )。
Private Sub Command1_Click( )
Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2#
For i=1 To 4
a(i)=i
Next i
For i=3 To 6
b(i)=i
Next i
s1=Factorial(
A.
B.