Private Sub Book(x As Integer)x=x * 2 + 1If x < 6 ThenCall Book(x)End Ifx=x * 2 + 1Print x;End SubPrivate Sub Command2_Click()Book 2End SubA) 23 47 B) 10 36C) 22 44 D) 24 5030) 单击命令按钮时,下列程序的执行结果为Private Sub Command1_

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/29 05:24:54
PrivateSubBook(xAsInteger)x=x*2+1IfxPrivateSubBook(xAsInteger)x=x*2+1IfxCallBook(x)EndIfx=x*2+1Print

Private Sub Book(x As Integer)x=x * 2 + 1If x < 6 ThenCall Book(x)End Ifx=x * 2 + 1Print x;End SubPrivate Sub Command2_Click()Book 2End SubA) 23 47 B) 10 36C) 22 44 D) 24 5030) 单击命令按钮时,下列程序的执行结果为Private Sub Command1_
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
30) 单击命令按钮时,下列程序的执行结果为
Private Sub Command1_Click()
Dim a As Integer,b As Integer,c As Integer
a=2:b=3:c=4
Print P2(c,b,A)
End Sub
Private Function P1(x As Integer,y As Integer,z As Integer)
P1=2 * x + y + 3 * z
End Function
Private Function P2(x As Integer,y As Integer,z As Integer)
P2=P1(z,x,y) + x
End Function
A) 21
B) 19
C) 17
D) 34
Private Sub Command1_Click()
Dim k As Integer,m As Integer
Dim p As Integer
k=4:m=1
p=PC(k,m) :Print p;
p=PC(k,m) :Print p
End Sub
Private Function PC(a As Integer,b As Integer)
Static m As Integer,i As Integer
m=0:i=2
i=i + m + 1
m=i + a + b
PC=m
End Function
程序运行后,输出的结果为
A) 4 6
B) 6 6
C) 8 8
D) 10 12

Private Sub Book(x As Integer)x=x * 2 + 1If x < 6 ThenCall Book(x)End Ifx=x * 2 + 1Print x;End SubPrivate Sub Command2_Click()Book 2End SubA) 23 47 B) 10 36C) 22 44 D) 24 5030) 单击命令按钮时,下列程序的执行结果为Private Sub Command1_
A
A
C

Private Sub Book(x As Integer)x=x * 2 + 1If x < 6 ThenCall Book(x)End Ifx=x * 2 + 1Print x;End SubPrivate Sub Command2_Click()Book 2End SubA) 23 47 B) 10 36C) 22 44 D) 24 5030) 单击命令按钮时,下列程序的执行结果为Private Sub Command1_ Private Sub 与 Sub的区别 问一道VB填空题:Private Sub Form_Click() Dim x As Integ问一道VB填空题:Private Sub Form_Click()Dim x As Integerx=5Do Print x;x=x-1Loop While Not xEnd Sub(A)5 (B)5 4 3 2 1(C)出现语法错误的信息 (D)陷入 Private Sub Command1_Click() Dim a As Long a = 1234 a& = 4567 Print a; a& End Sub vb题 下面程序的功能是什么?Private Sub Command1_Click() Dim s%,n% Dim a As String n = 0 a = InputBox(Please input a number:) For s = 1 To Len(a) If (func(Val(Mid(a,s,1)))) Thenn = n + 1NextPrint n End Sub Private Function func(x%) As Bool vb编程:单词分解怎么编?Private Sub Command1_Click() Dim s As String,a() As String,i As Integer s = Text1.Text Call aword(s,a) List1.AddItem p End Sub Private Sub Command2_Click() Text1.Text = List1.Clear Text1.SetFocus End Sub Private Sub Private Sub Form_Click() a = 1: b = a Do Until a >= 5 x = a * b Print b; x a = a + b b = b + a Loop Private Sub Command1_Click() For i = 1 To 3 For j = i To 1 a = a + 1 Next j Next i Print a End Sub private sub score_lostfocus( ) x=val(score.text) if x100 then beepscore.text=score.setfocuselsetotal=xend if end sub Private Sub Command_1Click()a=Val(Text1.Text)a=(3.141516180)*ax=Sin(a)x=Int(x*1000+0.5)/1000y=Cos(a)y=Int(y*1000+0.5)/1000Text2.Text=Str(x)Text3.Text=Str(y)End Sub①找出程序中哪些语句是完成信息的输入?哪些语句是完成信息的 Private Sub Form_Click()和Private Sub Command1_Click()有什么区别?什么时候用Form?什么时候用Command Private Sub Form_click()得到一组随机变量,怎样用到Private Sub Command1_Click()中去啊 能不能再帮我看一道题sum Fun (a() as integer,x as integer) for i = 1 to 4 x = x * a(i)Private sub command _click() n=1 for i = 1 to 4 arr(i)=i+i next Fun arr,n text1.text=str(n)End sub求文本框显示的 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:Private Sub Command1_Click() x = -5 If Sgn(x) Then y = Sgn(x ^ 2) Else y = Sgn(x) End If Print y End Sub 程序运行后,单击命令按钮,窗体上显示的是 A VB里的sub单词是什么意思,比如private sub……、end sub 看程序,)private sub form-click()dim a(5,5) as integer,s(5) as integerfor i=1 to 5s(i)= 0for j=1 to 5m(i,j)=i+jnext jnext ifor each x in sprint x;nextend sub 33.设有如下程序Private Sub Command1_Click( )Dim sum As Double,x As Doublesum = 0n = 0For i=1 To 5x = n / in = n + 1sum = sum + xNext iEnd Sub该程序通过For循环来计算一个表达式的值,这个表达式是______.A、1+1/2+2/3+3/4+4/5 B 0402 Private Sub Command1_Click() Dim a As Single,b As Single Dim c As Single,d As Single Dim m A0401Private Sub Form_Load()Dim x As Long,s As Stringx = InputBox(输入一个整数(1~40000))If x Mod 2 = 0 Thens = 偶数Elses = 奇数End IfMsgBo