题目内容

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

执行下列程序段后,x的值为()。x = 0For i = 1 To 4For j = 1 To ix = x + 1Next j, i

A. 16
B. 10
C. 9
D. 6

答案查题题库