单项选择题

在窗体上画一个命令按钮,然后编写如下程序 Private Sub Command1_Click( ) Dim a As Integer,b As hiteger a=1 b=2 Print N(a,b) End Sub Function N(x As Integer,y As Integer)As Integer N=IIf(x>y,x,y) End Function 程序运行后,单击命令按钮,输出结果为

A.1
B.2
C.5
D.8
<上一题 目录 下一题>
热门 试题

单项选择题
单击窗口时,下列程序代码的执行结果为 Private Sub Form_Click( ) Text1 End Sub Private Sub Text(x As Integer) x=x*3+1 if x<6 Then call Text(x) End if x=x*2+1 Print x; End Sub
A.27 55
B.11 35
C.22 45
D.24 51
单项选择题
单击按钮时,以下列程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=X+y End Sub Private Sub Command1_Click( ) Dim x As Integer,y As Integer,z As Integer x=1:y=2:z=3 Call proc1(x,x,2) Print x;x;z Call proc1(x,y,y) Print x;y;y End Sub
A.6 6 12 6 6 10
B.9 5 10 5 10 10
C.9 6 12 9 10 15
D.9 5 10 5 4 10
相关试题
  • 单击命令按钮时,下列程序的执行结果为 Pr...
  • 设有如下程序: Private Static Functio...
  • 有如下程序段,该程序段执行完后,共执行循...
  • 有以下函数过程: Function Gys(ByVal ...
  • 单击命令按钮时,下列程序的运行结果为 Pr...