在窗体上添加一个命令按钮Command1,然后编写如下事件过程:Private Sub Command1_Click()For i = 1 To 4x = 4For j = 1 To 3x = 3For k = 1 To 2x = x + 6Next kNext jNext iPrint xEnd Sub程序运行后,单击命令按钮,显示结果为()。
查看答案
执行下列程序段后,t的值是( )。Dim n As Integer, r As Integer, t As Stringn = 11Do While n <> 0r = n Mod 2n = n \ 2t = r & tLoop
A. 1100
B. 1011
C. 1001
D. 1010
如果整型变量a、b的值分别为3和1,则下列语句中循环体的执行次数是()。For i = a To bPrint iNext i
A. 2
B. 3
C. 0
D. 1
在窗体上添加两个文本框Text1、Text2和一个命令按钮Command1,编写如下事件过程:Private Sub Command1_Click()x = 0Do While x < 50x = (x + 2) * (x + 4)n = n + 1LoopText1.Text = CStr(n)Text2.Text = CStr(x)End Sub运行时,单击命令按钮,Text1和Text2分别显示()。
A. 2和120
B. 0和0
C. 1和8
D. 3和15180
在窗体上添加一个命令按钮Command1,然后编写如下事件过程:Private Sub Command1_Click()Dim a As Integer, s As Integera = 8s = 1Dos = s + aa = a - 1Loop While a <= 0Print s; aEnd Sub程序运行后,单击命令按钮,则窗体上显示的内容是()。
A. 死循环
B. 34 0
C. 7 9
D. 9 7