有如下事件程序,运行该程序后输出结果是。 Private Sub Command33_Click() Dim x As Integer, y As Integer x = 1: y = 0 Do Until y <= 25 y = y + x * x x = x + 1 Loop MsgBox "x=" & x & ", y=" & y End Sub
举一反三
- 有如下事件程序,运行该程序后输出结果是_________。 Private Sub Command33_Click() Dim x As Integer, y As Integer x=1:y=0 Do Until y<=25 y=y+x*x x=x+1 Loop MsgBox "x=" & x &",y=" & y End Sub A: x=1,y=0 B: x=4,y=25 C: x=5,y=30 D: 输出其他结果
- 编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 1: y = 1 Do y = x * y If y > 10 Then Print x, y Exit Do Else x = x + 3 End If Loop While x <= 10 End Sub 运行程序,输出结果为______
- Sub s1(ByVal x As Integer, ByVal y As Integer) Dim t As Integer t = x: x = y: y = t End Sub Sub s2(x As Integer, y As Integer) Dim t As Integer t = x: x = y: y = t End Sub 则以下说法中正确的是( )。
- 下面程序运行后,点击窗体,变量 x和y的值分别为( )、( ) Private Sub Form_Click() Dim x, y As Integer x = 5: y = 10 nc x, y Print "x="; x; "y="; y End Sub Private Sub nc(ByVal a%, b%) a = a + b b = a a = a * b End Sub
- 以下程序运行后的输出结果是 ______。 Sub add(x,y) x=x+y Print "x=";x;",y=";y End Sub Private Sub Command1_Click() x=1 y=1 Call add((x),(y)) Print"x="; x;",y=";y End Sub A: x=1,y=1 B: x=2,y=2 C: x=2,y=1 D: x=1,y=1 E: x=1,y=1 F: x=1,y=1 G: x=2,y=1 H: x=2,y=1