注意:此页面搜索的是所有试题
国家开放大学Visual Basic6.0程序设计
Private Sub Command1_Click()
x = 0
Do While x < 50
x = (x + 2) * (x + 3)
n = n + 1
Loop
Text1.Text = Str(n)
Text2.Text = Str(x)
End Sub
程序运行后,单击Command1按钮,在两个文本框中显示的值分别为( )。
A、1 0 B、2 72
C、3 50 D、4 168
Private Sub Command1_Click()
x = 1: n = 0
Do While x < 100
x = x * 10
n = n + 1
Loop
Text1.Text = Str(n)
Text2.Text = Str(x)
End Sub
程序运行后,单击命令按钮,在两个文本框中显示的值分别为( )。
A、10 0 B、2 100
C、3 50 D、4 168
Private Sub Form_Click()
For i = 1 To 10 Step 2
y = y + i
Next i
Print i
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、25 B、10
C、11 D、9
Private Sub Form_Click()
I = 0
For G = 10 To 19 Step 3
I = I + 1
Next G
Print I
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、4 B、5
C、3 D、6
Private Sub Form_Click()
Dim c As Integer, j As Integer, k As Integer
k = 1
c = 2
For j = 1 To 5
If j > 3 Then
c = c + 5
Exit For
Else
k = k + 1
End If
Next j
Print c, k
End Sub
程序运行后,单击窗体,在窗体上显示的c,k的值分别是( )。
A、7 3 B、7 4
C、2 4 D、7 5
Private Sub Form_Click()
Dim I As Integer, j As Integer
Dim c As Integer
c = 0
For I = 1 To 3
For j = 1 To 2
c = c + 3
Next j
Next I
Print c
End Sub
程序运行后,单击窗体,在窗体上显示的结果是( )。
A、18 B、15
C、12 D、9
Private Sub Form_Click()
Dim i As Integer, k As Integer, c As Integer
For i = 1 To 5
If i Mod 2 = 0 Then
k = k + 2
Else
c = c + 3
End If
Next i
Print k, c
End Sub
程序运行后单击窗体,Form1上的输出结果是( )。
A、2 12 B、4 9
C、4 6 D、2 9
Private Sub Command1_Click()
Dim i As Integer, n As Integer
For i = 0 To 50
i = i + 3
n = n + 1
If i > 10 Then Exit For
Next i
Text1.Text = Str(n)
End Sub
程序运行后,单击命令按钮,在文本框中显示的值是( )。
A、2 B、3
C、4 D、5
Private Sub Form_Click()
Dim i As Integer, k As Integer, c As Integer
For i = 1 To 10
If i Mod 2 = 0 Then
k = k + 3
Else
c = c + 4
End If
Next i
Print k, c
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、10 20 B、20 15
C、15 20 D、10 30
Private Sub Form_Click()
Dim c As Integer, j As Integer, k As Integer
k = 1
c = 2
For j = 1 To 5
If j > 3 Then
c = c + 6
Exit For
Else
k = k + 3
End If
Next j
Print c, k
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、10 8 B、8 10
C、8 7 D、8 4
Private Sub Form_Click()
Dim i As Integer, k As Integer
Static c As Integer
For i = 1 To 6
If i Mod 2 = 0 Then
k = k + 2
Else
c = c + 3
End If
Next i
Print k, c
End Sub
程序运行后,连续两次单击窗体,在窗体上显示的值是( )。
A、6 12 B、6 24
C、6 9 D、6 18
Private Sub Form_click()
b = 1
Do While b < 40
b = b * (b + 1)
Loop
Print b
End Sub
程序运行后,单击窗体,在窗体上显示的值为( )。
A、42 B、39
C、6 D、1
Private Sub Form_Click()
Dim A(1 To 3) As String
Dim c As Integer
Dim j As Integer
A(1) = "3"
A(2) = "6"
A(3) = "9"
c = 1
For j = 1 To 3
c = c + Val(A(j))
Next j
Print c
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、10 B、19
C、16 D、17
Private Sub Command1_Click()
Dim A(1 To 5) As Integer
Dim x As Integer
For i = 1 To 5
A(i) = i
Next i
i = 1
Do While x < 6
A(i) = A(i) + x
x = x + 2
i = i + 2
Loop
Text1.Text = A(3)
Text2.Text = A(5)
End Sub
程序运行后,单击命令按钮,在两个文本框中显示的值是( )。
A、5 9 B、5 4
C、9 5 D、4 5
Private Sub Command1_Click()
Dim A(1 To 5) As Integer
Dim x As Integer
For i = 1 To 5
A(i) = i
Next i
i = 1
Do While x < 2
A(i) = A(i) * x
x = x + 1
i = i + 1
Loop
Text1.Text = A(1)
Text2.Text = A(2)
End Sub
程序运行后,单击Command1后按钮,文件框Text1、Text2中的结果是( )。
A、2 0 B、0 2
C、2 4 D、2 5
x = 0
Do While x < 50
x = (x + 2) * (x + 3)
n = n + 1
Loop
Text1.Text = Str(n)
Text2.Text = Str(x)
End Sub
程序运行后,单击Command1按钮,在两个文本框中显示的值分别为( )。
A、1 0 B、2 72
C、3 50 D、4 168
Private Sub Command1_Click()
x = 1: n = 0
Do While x < 100
x = x * 10
n = n + 1
Loop
Text1.Text = Str(n)
Text2.Text = Str(x)
End Sub
程序运行后,单击命令按钮,在两个文本框中显示的值分别为( )。
A、10 0 B、2 100
C、3 50 D、4 168
Private Sub Form_Click()
For i = 1 To 10 Step 2
y = y + i
Next i
Print i
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、25 B、10
C、11 D、9
Private Sub Form_Click()
I = 0
For G = 10 To 19 Step 3
I = I + 1
Next G
Print I
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、4 B、5
C、3 D、6
Private Sub Form_Click()
Dim c As Integer, j As Integer, k As Integer
k = 1
c = 2
For j = 1 To 5
If j > 3 Then
c = c + 5
Exit For
Else
k = k + 1
End If
Next j
Print c, k
End Sub
程序运行后,单击窗体,在窗体上显示的c,k的值分别是( )。
A、7 3 B、7 4
C、2 4 D、7 5
Private Sub Form_Click()
Dim I As Integer, j As Integer
Dim c As Integer
c = 0
For I = 1 To 3
For j = 1 To 2
c = c + 3
Next j
Next I
Print c
End Sub
程序运行后,单击窗体,在窗体上显示的结果是( )。
A、18 B、15
C、12 D、9
Private Sub Form_Click()
Dim i As Integer, k As Integer, c As Integer
For i = 1 To 5
If i Mod 2 = 0 Then
k = k + 2
Else
c = c + 3
End If
Next i
Print k, c
End Sub
程序运行后单击窗体,Form1上的输出结果是( )。
A、2 12 B、4 9
C、4 6 D、2 9
Private Sub Command1_Click()
Dim i As Integer, n As Integer
For i = 0 To 50
i = i + 3
n = n + 1
If i > 10 Then Exit For
Next i
Text1.Text = Str(n)
End Sub
程序运行后,单击命令按钮,在文本框中显示的值是( )。
A、2 B、3
C、4 D、5
Private Sub Form_Click()
Dim i As Integer, k As Integer, c As Integer
For i = 1 To 10
If i Mod 2 = 0 Then
k = k + 3
Else
c = c + 4
End If
Next i
Print k, c
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、10 20 B、20 15
C、15 20 D、10 30
Private Sub Form_Click()
Dim c As Integer, j As Integer, k As Integer
k = 1
c = 2
For j = 1 To 5
If j > 3 Then
c = c + 6
Exit For
Else
k = k + 3
End If
Next j
Print c, k
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、10 8 B、8 10
C、8 7 D、8 4
Private Sub Form_Click()
Dim i As Integer, k As Integer
Static c As Integer
For i = 1 To 6
If i Mod 2 = 0 Then
k = k + 2
Else
c = c + 3
End If
Next i
Print k, c
End Sub
程序运行后,连续两次单击窗体,在窗体上显示的值是( )。
A、6 12 B、6 24
C、6 9 D、6 18
Private Sub Form_click()
b = 1
Do While b < 40
b = b * (b + 1)
Loop
Print b
End Sub
程序运行后,单击窗体,在窗体上显示的值为( )。
A、42 B、39
C、6 D、1
Private Sub Form_Click()
Dim A(1 To 3) As String
Dim c As Integer
Dim j As Integer
A(1) = "3"
A(2) = "6"
A(3) = "9"
c = 1
For j = 1 To 3
c = c + Val(A(j))
Next j
Print c
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、10 B、19
C、16 D、17
Private Sub Command1_Click()
Dim A(1 To 5) As Integer
Dim x As Integer
For i = 1 To 5
A(i) = i
Next i
i = 1
Do While x < 6
A(i) = A(i) + x
x = x + 2
i = i + 2
Loop
Text1.Text = A(3)
Text2.Text = A(5)
End Sub
程序运行后,单击命令按钮,在两个文本框中显示的值是( )。
A、5 9 B、5 4
C、9 5 D、4 5
Private Sub Command1_Click()
Dim A(1 To 5) As Integer
Dim x As Integer
For i = 1 To 5
A(i) = i
Next i
i = 1
Do While x < 2
A(i) = A(i) * x
x = x + 1
i = i + 1
Loop
Text1.Text = A(1)
Text2.Text = A(2)
End Sub
程序运行后,单击Command1后按钮,文件框Text1、Text2中的结果是( )。
A、2 0 B、0 2
C、2 4 D、2 5