题目内容

下列程序代码的运行结果为()。Private Sub Command1_Click()For m = 1 To 10 Step 2a = 10For n = 1 To 20 Step 2a = a + 2Next nNext mPrint aEnd Sub

A. 20
B. 30
C. 50
D. 60

查看答案
更多问题

在窗体上添加一个命令按钮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程序运行后,单击命令按钮,显示结果为()。

A. 157
B. 15
C. 7
D. 538

执行下列程序段后,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

答案查题题库