题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-03 19:36:58

[单项选择]单击—次命令按钮后,下列程序的执行结果是
Private Sub Command1_Click( )
S=P(1)+P(2)+P(3)+P(4)
Print S
End Sub
Public Function P(N As Integer)
Static Sum
For i=1 To N
Sum=Sum+i
Next i
P=Sum
End Function
A. 15
B. 25
C. 35
D. 45

更多"单击—次命令按钮后,下列程序的执行结果是 Private Su"的相关试题:

[单项选择]单击—次命令按钮后,下列程序的执行结果是 Private Sub Command1_Click( ) S=P(1)+P(2)+P(3)+P(4) Print S End Sub Public Function P(N As Integer) Static Sum For i=1 To N Sum=Sum+i Next i P=Sum End Function
A. 15
B. 25
C. 35
D. 45
[单项选择]单击一次命令按钮后,下列程序的执行结果是
Private Sub Command1_Click( )
s=P(1) + P(2) + P(3) + P(4)
Print s
End Sub
Public Function P(N As Integer)
Static Sum
For i=1 To N
Sum=Sum + i
Next i
P=Sum
End Function
A. 15
B. 25
C. 35
D. 45
[单项选择]单击一次命令按钮后,下列程序的执行结果是( )。
Private Sub Commandl_Click( )
s=P(1)+P(2)+P(3)+P(4)
Print s
End Sub
Public FunctionP(N As Integer)
Static Sum
Fori=1To N
Sum=Sum+i
Nexti
P=Sum
End Function
A. 15
B. 25
C. 35
D. 45
[填空题]单击命令按钮后,下列程序代码的执行结果是______ 。 Public Sub fun (Byval a ( ) As Integer) Static n As Integer Do a(n) = a (n) + a(n + 1) n = n + 1 Loop While n < 3 End Sub Private Sub command1_ click( ) Dim m As Integer, n As Integer, a(10) As Integer For n = 0 To 2: a(n) = n + 1: Next n For n = 1 To 2: Call fun(a): Next n For n = 0 To 3: Print a(n): Next n End Sub
[填空题]单击命令按钮后,下列程序代码的执行结果是______ 。 Public Sub fun (a As Integer, b As Integer, c As Integer) Do a=b+ c n=n+1 Loop While n > 3 End Sub Private Sub command1_ click( ) Dim m As Integer, n As Integer, i As Integer For i = 0 To 2: m = n + 1: Next i For i = 1 To 2: Call fun (m, n, i): Next i For i = 0 To 3 Print m; Next i End Sub
[单项选择]执行下面的程序,单击命令按钮后,窗体中的输出结果是 ______。
Private Sub Cotomand1_Click( )
Ch$="Welcome Home!"
a=Len(ch$)
For i= 1 To a
b$ = Mid(ch$, i 1)
If b$ = "m" Then m = m + 1
Next 1
Print m
End Sub
A. 2
B. 3
C. 1
D. 0
[单项选择]单击一次命令按钮后,下列程序的执行结果为   Private Sub Command1_Click( )     Dim m As Integer,I As Integer,x(10) As Integer     For I=0 To 4:x(I)=I+1:Next I     For I=1 TO 2:Call Prioc(x):Next I     For I=0 TO 3:Print x(I);:Next I   End Sub   Private Sub Prioc(a( )As Integer)     Static I As Integer     Do      a(I)=a(I)+a(I+1)      I=I+1    Loop While I<2   End Sub
A. 3 4 7 5
B. 3 5 7 4
C. 1 2 3 4
D. 1 2 3 5
[单项选择]单击一次命令按钮后,下列程序的执行结果为( )。   Private Sub Command1_Click( )     Dim m As Integer,I As Integer,x(10) As Integer     For I=0 To 4:x(I)=I+1:Next I     For I=1 TO 2:Call Prioc(x):Next I     For I=0 TO 3:Print x(I);:Next I   End Sub   Private Sub Prioc(a( )As Integer)     Static I As Integer     Do      a(I)=a(I)+a(I+1)      I=I+1    Loop While I<2   End Sub
A. private
B. 无修饰符
C. public
D. protected
[单项选择]单击命令按钮,下列程序的执行结果是  Private Sub Blck (x As Integer)    x = x * 2 + l    If x <6 Then      Call Blck(x)    End If    x = x * 2 + 1    Print x;  End Sub  Private Sub Commandl_Click( )    Blck 2  End Sub
A. 23 47
B. 10 36
C. 22 44
D. 24 50
[单项选择]单击窗体时,下列程序的执行结果是  Private Sub Invert(By Val xstr As String,ystr As String)    Dim tempstr AS String    Dim I AS Integer    I=Len(xstr)    Do While I>=1     tempstr=tempstr + Mid(xstr,I,1)     I=I - 1    Loop    ystr=tempStr  End Sub  Private Sub Form_Click( )    Dim s1 As String,s2 As String    S1="abcdef"    Invert S1,S2    Print S2  End Sub
A. abcdef
B. afbecd
C. fedcba
D. defabc
[单项选择]单击命令按钮时,下列程序的执行结果是 Private Sub Commandl_Click( ) Dim a As Integer,b As Integer,c As Integer a=3:b=4:c=5 Print SecProc(c,b,a) End Sub Function FirProc(x As Integer,y As Integer,z As Integer) FirProc=2*x+y+3*z End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y) +x End Function
A. 20
B. 22
C. 28
D. 30
[单项选择]单击命令按钮时,下列程序的执行结果是
Private Sub Book( x As Integer)
x=x*2+1
If x<6 Then
Call Book(x)
End If
x=x * 2 + 1
Print x;
End Sub
Private Sub Command2_Click( )
Book 2
End Sub
A. 23 47
B. 10 36
C. 22 44
D. 24 50

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码