第1题
运行列程序单击Command1 窗体显示第行容______1____ 第二行容_____2____ 第三行容_____3______
Option Explicit
Private Sub Command1_Click()
Dim s As String
sBasic
Call trans(s)
End Sub
Private Sub trans(s As String)
Dim j As Integert As String
Dim k As Integer
k3
Do
jInStr(sa)
tLCase(Right(sj))
sRight(tLen(s)k) & Left(sLen(t))
kk1
Print s
Loop Until k0
End Sub
答案:
(答案1)
icBa
(答案2)
baicBa
(答案3)
baba
第2题
执行面程序单击Command1窗体显示第行_1___第三行__2__行__3__
Option Explicit
Private Sub Command1_Click()
Dim x As Integery As Integer
x12y0
Do While x> 0
If x Mod 40 Then
yy+x
Else
yyx
End If
xx3
Print xy
Loop
End Sub
答案:
(答案1)
9 12
(答案2)
3 3
(答案3)
0 6
第3题
执行面程序单击Command1窗体显示第行______1_____第二行______2____第四行______3_____
Option Explicit
Private Sub Command1_Click()
Dim a As Integer b As Integer
a1 b1
Call sub1(a b)
Print a b
End Sub
Private Sub sub1(a As Integer b As Integer)
aa+b bb+a
Print a b
If a>10 Then
aa+b
bb+a
Else
Call sub1(a b)
End If
End Sub
答案:
(答案1)
2 3
(答案2)
5 8
(答案3)
34 55
第4题
运行面程序单击Command1窗体显示变量a值____1______变量b值_____2____变量c值_____3______
Option Explicit
Private Sub Command1_Click()
Dim a As Integer b As Integer c As Integer
a5 b10 c15
Print fun(abc)+fun(abc)
Print abc
End Sub
Private Function fun(x As Integer y As Integer z As Integer) As Integer
zx
xx+y
yy+z
funx+y
End Function
答案:
(答案1)
30
(答案2)
30
(答案3)
15
第5题
执行面程序连续三次单击命令钮Command1A数组 1 元素数组元素A(2)值2 A(4)值 3
Option Explicit
Option Base 1
Private Sub Command1_Click()
Static A( ) As Integern As Integer
Dim i As Integerk As Integer
kn '
nn + 2
ReDim Preserve A(n)
For ik+1 To n
A(i)i*n+1
Next i
For i1 To n
Print A(i)
Next i
End Sub
答案:
(答案1)
6
(答案2)
5
(答案3)
17
第6题
运行面程序单击Command1窗体显示变量A值___1____变量B值____2______
Option Explicit
Dim a As Integer
Private Sub Command1_Click()
Dim b As Integer
b 3
a 4
b fun(fun(a b + 2) a) + b
Print a b
End Sub
Private Function fun(n As Integer k As Integer)
n n + a
k n k
fun n + k + a
End Function
答案:
(答案1)
19
(答案2)
68
第7题
执行面程序单击Commandl窗体第行显示1 第二行显示2
Option Explicit
Dim x As Integer
Private Sub Command1_Click()
Dim y as Integer
X10Y2
Call process(y)
Print XY
Call process((y))
Print XY
End Sub
Private Sub process(n As Integer)
Dim y As Integer
If n>0 Then
xxn
yx
Else
xx+n
yx+2
End If
nn
End Sub
答案:
(答案1)
8 2
(答案2)
6 2
第8题
执行面程序单击Command1窗体显示第行__1___第二行___2___第四行___3_______行___4_____
Option Explicit
Private Sub Command1_Click()
Dim n As Integer
n 5
Call test(n)
Print n
End Sub
Private Sub test(ByVal n As Integer)
Dim i As Integer s As Integer
If n > 0 Then
For i 1 To n
s s & CStr(i)
Next i
Print s
Call test(n 2)
Else
Print OVER
End If
End Sub
答案:
(答案1)
12345
(答案2)
123
(答案3)
OVER
(答案4)
5
第9题
运行列程序单击Command1窗体显示第行容1第二行容2第三行容3(AASCII码65Z90)
Option Explicit
Private Sub Command1_Click()
Dim i As Integer st As String n As Integer p As String * 1
p B
For i 3 To 1 Step 1
n Asc(p) i
If n < 65 Then n n + 26
st Chr(n)
st st & F(i)
Print st
Next i
End Sub
Private Function F(n As Integer)
Dim i As Integer
Static s As Integer
For i 1 To n
s s + i
Next i
F s
End Function
答案:
(答案1)
Y6
(答案2)
Z9
(答案3)
A10
第10题
执行面程序单击Command1输出变量i值1变量j值2变量k值3
Option Explicit
Private Sub Command1_Click()
Dim i As Integerj As Integer
Dim k As Integer
i10
j4
kFunk(ij)
Print ijk
End Sub
Priate Function Funk(ByVal A As IntegerB As Integer) As Integer
AA+B
BB2
If B0 Or B1 Then
Funk1
Else
FunkA+Funk(AB)
End If
End Function
答案:
(答案1)
10
(答案2)
0
(答案3)
15
第11题
运行面程序果连续三次单击命令钮A数组___1___元素数组元素A(2)值__2____A(5)值__3______
Option Explicit
Option Base 1
Private Sub Command1_Click()
Static a() As Integer n As Integer
Dim i As Integer k As Integer
k n
n n + 2
ReDim Preserve a(n)
For i k + 1 To n
a(i) i * n + 1
Next i
For i 1 To n
Print a(i)
Next i
End Sub
答案:
(答案1)
6
(答案2)
5
(答案3)
31
第12题
执行面程序单击Command1窗体界面显示第行1第二行2第三行3 第四行4
Option Explicit
Private Sub Command1_Click()
Dim a As Integerb As Integeri As Integer
i1218
ai\100
bi Mod 100
If b<>0 Then
Print a
Print b
. Print Lcd((a)(b))ab
Print Lcd(ab)ab
End If
End Sub
Private Function Lcd(x As IntegerY As Integer) As Integer
Dim d As Integer
If x
End If
dx
Do
If x Mod y0 Then
Lcdx
Exit Do
Else
xx+d
End If
Loop
End Function
答案:
(答案1)
12
(答案2)
18
(答案3)
36 12 18
(答案4)
36 36 12
第13题
执行程序单击Command1Picturel显示第行1第二行2第三行3
Option Explicit
Private Sub Command1_Click()
Dim A(33) As Integeri As Integerj As Integer
Dim k As Integer
i3j2A(ij)1k1
Do Until k>9
kk+1
If i+1>3 And j+1<3 Then
i1jj+1
ElseIf i+1<3 And j+1>3 Then
ii+1j1
Elself i+1>3 And j+1>3 Then
ii1
ElseIf i+1<3 And j+1<3 And A(i+1j+1)<>0 Then
ii1
Else
ii+1jj+1
End If
A(ij)k
Loop
For i1 To 3
For j1 To 3
Picture1Print A(ij)
Next j
Picture1Print
Next i
End Sub
答案:
(答案1)
4 9 2
(答案2)
3 5 7
(答案3)
8 1 6
第14题
执行列程序单击Command1窗体显示第行容__1__第二行容__2__第三行容_3___
Option Explicit
Private Sub Command1_Click
Dim n As Integer i As Integer
n2
For i7 To 1 Step 1
Call sub2(in)
Print in
Next i
End Sub
Private Sub sub2(x As Integery As Integer)
Static n As Integer
Dim i As Integer
For i 2 To 1 Step 1
n n+x
x x1
Next i
yy+n
End Sub
答案:
(答案1)
5 15
(答案2)
2 35
(答案3)
1 56
第15题
执行列程序单击Command1窗体显示变量b值__1__变量c值___2_变量z值__3__
Private Sub Command1_Click()
Dim b As Integerc As Integerz As Integer
b2
c1
zfun(bfun(b+1c))+bc+1
Print bcz
End Sub
Private Function fun(x As IntegerByVal y As Integer) As Integer
xxy
yx+y+2
funyx
End Function
答案:
(答案1)
1
(答案2)
1
(答案3)
4
第16题
执行面程序单击Command1窗体显示第行____1____第二行_____2____第四行__3______
Option Explicit
Private Sub Command1_Click()
Dim a As Integer b As Integer i As Integer
a2b5
For ia To a*b Step a
Call sub1(iab)
Print ab
Next i
Print abi
End Sub
Private Sub sub1(i As Integer a As Integer b As Integer)
ii+1
aa+1
bb+1
End Sub
答案:
(答案1)
3 6
(答案2)
4 7
(答案3)
5 8 11
第17题
执行面程序单击Command1窗体显示第行__1__第二行__2__第三行_3___
Option Explicit
Option Base 1
Private Sub Command1_Click()
Dim sa (33) As String*1i As Integerj As Integerk as Integer
k1
For i1 To 3
For j1 To 3
sa(ij)Chr(Asc(A)+(k+i+j) Mod 26)
Print sa(ij)
kk+3
Next j
Next i
End Sub
答案:
(答案1)
D H L
(答案2)
N R V
(答案3)
X B F
第18题
执行面程序单击Command1数组元素a(12)数值____1_____a(33)数值____2______图片框中行显示____3_____
Option Explicit
Private Sub Command1_Click()
Dim a(44) as Integer i as Integer j as Integer
Dim k As Integer num as Integer
num0
For k1 To 4
For i1 To k1
numnum+1
a(ik)num
next i
For jk To 1 Step 1
numnum+1
a(kj)num
next j
next k
For i1 To 4
For j1 To 4
Picture1Print Right( & a(ij)3)
Next j
Picture1Print
Next i
End Sub
答案:
(答案1)
2
(答案2)
7
(答案3)
16 15 14 13
第19题
执行面程序单击Command1图片框中显示第行___1___显示第二行_____2___行显示___3_____
Private Sub Command1_Click()
Dim a(3 3) As Integer
Dim i As Integer j As Integer
For i 1 To 3
For j 3 To 1 Step 1
If i > j Then
a(i j) i j
Else
a(i j) j i
End If
Next j
Next i
For i 1 To 3
For j 3 To 1 Step 1
Picture1Print a(i j)
Next j
Picture1Print
Next i
End Sub
答案:
(答案1)
2 1 0
(答案2)
1 0 1
(答案3)
0 1 2
第20题
执行面程序单击Command1窗体显示第行1第二行2 第三行3
Option Explicit
Private Sub Command1_Click()
Dim a As Stringi As Integer
Dim x As Stringz As String
aiamstudent
iInStr(5ad)
Do
xMid(ai3)
zRight(x1)
zUCase(x & Z)
ii2
Print z
Loop Until i1
End Sub
答案:
(答案1)
DENN
(答案2)
TUDD
(答案3)
MSTT
《香当网》用户分享的内容,不代表《香当网》观点或立场,请自行判断内容的真实性和可靠性!
该内容是文档的文本内容,更好的格式请下载文档