网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有如下事件过程: Private Sub Command1_Click() b=10 Do Until b =-1 a = InputBox("请输入a的值") a = Val(a)b = InputBox("请输入b值") b = Val(b)a=a*b Loop Print a End Sub 程序运行后,依次输入数值30,20,10,-1后,输出结果为( )。
A.6000
B.-10
C.200
D.-6000
参考答案
更多 “ 有如下事件过程: Private Sub Command1_Click() b=10 Do Until b =-1 a = InputBox("请输入a的值") a = Val(a)b = InputBox("请输入b值") b = Val(b)a=a*b Loop Print a End Sub 程序运行后,依次输入数值30,20,10,-1后,输出结果为( )。A.6000B.-10C.200D.-6000 ” 相关考题
考题
有下列事件过程: Private Sub Command1_Click() b = 10 Do Until b = -1 a = InputBox("请输入a的值") a = Val(a) b = InputBox("请输入b的值") b = Val(b) a = a * b Loop Print End Sub程序运行后,依次输入数值30,20,10,-1后,输出结果是。A. 6000 B. -10 C. 200 D. -6000
考题
有一过程如下:Sub Sub1(m As Integer,total As Long)Dim i As Integertotal=1For i=1 To mtotal=total*iNextEnd Sub调用它的事件过程如下:Private Sub Command1_Click()Dim tot As Long,a As Integera=Val(InputBox("请输入数据"))Call Sub1(a,tot)Print totEnd Sub则输入数据5,运行结果为【 】。
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()x=0Do Until x=-1a=InputBox("请输入第一个数字a的值")a=Val(A)b=InputBox("请输入第二个数字b的值")b=Val(b)x=InputBox("请输入第三个数字x的值")x=Val(x)a=a + b + xLoopPrint aEnd Sub在程序运行后,单击命令按钮,在对话框中分别输入5,4,8,5,8,-1,输出结果为 【9】 。
考题
( 35 )设在工程文件中有一个标准模块,其中定义了如下记录类型:Type BooksName As String * 10TelNum As String * 20End Type在窗体上画一个名为 Command1 的命令按钮,要求当执行事件过程 Command1_Click 时,在顺序文件Person.txt 中写入一条 Books 类型的记录。下列能够完成该操作的事件过程是A ) Private Sub Command1_Click()Dim B As BooksOpen “ Person.txt ” For Output As #`1B.Name=InputBox( “ 输入姓名 ” )B.TelNum=InputBox( “ 输入电话号码 ” )Write #1,B.Name,B.TelNumClose #1End SubB ) Private Sub Command1_Click()Dim B As BooksOpen “ Person.txt ” For input As #`1B.Name=InputBox( “ 输入姓名 ” )B.TelNum=InputBox( “ 输入电话号码 ” )Print #1,B.Name,B.TelNumClose #1End SubC ) Private Sub Command1_Click()Dim B As BooksOpen “ Person.txt ” For Output As #`1B.Name=InputBox( “ 输入姓名 ” )B.TelNum=InputBox( “ 输入电话号码 ” )Write #1,BClose #1End SubD ) Private Sub Command1_Click()Open “ Person.txt ” For input As #`1Name=InputBox( “ 输入姓名 ” )TelNum=InputBox( “ 输入电话号码 ” )Print #1, Name, TelNumClose #1End Sub
考题
在窗体上添加一个命令按钮,名为command1,事件过程为:Private Sub command1_Click( )x=0Do Until c=-1a= val(InputBox(“输入a的值”))b= val(InputBox(“输入b的值”))c= val(InputBox(“输入c的值”))LoopPrint aEnd Sub程序运行后,单击命令按钮,依次在输入对话框中输入5,4,3,2,1,-1后,输出的结果是 ( )A.2B.3C.4D.5
考题
(14)窗体中有一个命令按钮,然后编写下列事件过程: Private Sub Command1_Click() x=0 Do Until x=-1 a=InputBox("请输入第一个数字a的值") a=Val(a) b=InputBox("请输入第二个数字b的值") b=Val(b) x=InputBox("请输入第二个数字x的值") x=Val(x) a=a+b+x Loop Print a End Sub 在程序运行后,单击命令按钮,在对话框中分别输入5,4,8,5,8,-1,输出的结果是。
考题
假定在工程文件中有一个标准模块,其中定义了如下记录类型Type BooksName As String * 10TelNum As String * 20End Type要求当执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是( )。A.Private Sub Command1_Click()Dim B As BooksOpen "c:\Person.txt" For Output As #1B.Name = InputBox("输入姓名")B.TelNum = InputBox("输入电话号码")Write #1, B.Name, B.TelNumClose #1End SubB.Private Sub Command1_Click()Dim B As BooksOpen "c:\Person.txt" For Input As #1B.Name = InputBox("输入姓名")B.TelNum = InputBox("输入电话号码")Print #1, B.Name, B.TelNumClose #1End SubC.Private Sub Command1_Click()Dim B As BooksOpen "c:\Person.txt" For Output As #1Name = InputBox("输入姓名")TelNum = InputBox("输入电话号码")Write #1, BClose #1End SubD.Private Sub Command1_Click()Dim B As BookOpen "c:\Person.txt" For Input As #1Name = InputBox("输入姓名")TelNum = InputBox("输入电话号码")Print #1, B.Name, B.TelNumClose #1 End Sub
考题
在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() a=InputBox("请输入一个整数") b=InputBox("请输入一个整数") Print a+b End Sub 程序运行后,单击命令按钮,在输入对话框中分别输入37和18,输出结果为A.3718B.55C.0D.a+b
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()X=0Do While X<>-1X=Val(InputBox("请输入数据X:"))Y=Val(InputBox("请输入数据Y:"))If X*Y<X+Y Then Print X,YLoopEnd Sub程序运行后,依次输入7,2,-3,8,-5,-10,18,-1,-1,则输出结果是【 】
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1 Click()Do Until b<Oa=InputBox("输入a的值")a=Val(A)b=InputBox("输入b的值")b=Val(B)a=a+bLoopPrint aEnd Sub程序运行后,依次输入5,4,3,2,1,0,-1,-2,则输出结果是 【 】
考题
在窗体上画一个命令按钮,然后编写如下事件过程。该程序运行后,单击命令按钮,在输入对话框中分别输入321和456,则输出结果为【 】。Private Sub Command1_Click()a=InputBox("请输入一个整数")b=InputBox("请再输入一个整数")Print a+bEnd Sub
考题
有如下事件过程: Private Sub Commandl_Click() b=10 Do Until b=-1 a=InputBox(“请输入a的值”) a=Val(A) b=InputBox(“请输入b的值”) b=Val(B) a=a*b Loop Pdnt a End Sub 程序运行后,依次输入数值30,20,10,-1,输出结果为( )。A.6000B.-10C.200D.-6000
考题
有如下事件过程: Private Sub Command1_Click() b=10 Do Until b=-1 a=InputBox("请输入a的值") a=Val(A) b=InputBox("请输入b的值") b=Val(B) a=a*b Loop Print a End Sub 程序运行后,依次输入数值30,20,10,-1后,输出结果为( )。A.6000B.-10C.200D.-6000
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Commandl_Click()DO Until b0a=InputBox(”输入a的值”)a=Val(a)b=InputBox(”输入b的值”)b=Val(b)a=a+bLoopPrint aEnd Sub程序运行后,依次输入5,4,3,2,1,0,-1,-2,则输出结果是【 】。
考题
有下列事件过程:Private Sub Command1_Click()b=10Do Until b=-1a=InputBox("请输入a的值")a=Val(A)b=InputBox("请输入b的值")b=Val(B)a=a*bLoopPrint aEnd Sub程序运行后,依次输入数值30,20,10,-1后,输出结果是( )。A.6000B.-10C.200D.-6000
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Do While b>=0a=Val(InputBox("请输入a的值"))b=Val(InputBox("请输入b的值"))c=a+bLoopMsgBox cEnd Sub程序运行后,依次输入3,2,1,0,-1,-2,则输出结果是______。
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_ Click() x=0 Do Until x=-1 a=InputBox(“请输入A的值”) a=Val(a)b=InputBox(“请输入B的值”) b=Val(b)x=InputBox(“请输入x的值”) x=Val(x) a=a+ b+ x Loop Print aEnd Sub程序运行后,单击命令按钮,依次在输入对话框中输入5、4、3、2、1、-1,则输出结果为 ______。A.2B.3C.14D.15
考题
在窗体上画一个命令按钮,然后编写如下事件过程: Prevate Sub Command1_ Click() x=0 Do Until x=-1 a= InputBox(“请输入A的值”) a= Val (A)b=InputBox(“请输入B的值”) b=Val (B)x=InputBox(“请输入x的值”) x=Val (x) a=a+ b+ x Loop Print a End Sub程序运行后,单击命令按钮,依次在输入对话框中输入5、4、3、2、1、-1,则输出结果为______ 。A.2B.3C.14D.15
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click( )Do Until b < 0a = InputBox( "输入a的值" )a = Val(@A@b = InputBox( "输入b的值" )b =VM(@B@a=a+bLoopPrint aEnd Sub程序运行后,依次输入5,4,3,2,1,0,-1,-2,则输出结果是【 】。
考题
在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() x=0 Do Until x=-1 a=InputDox("请输入a的值") a=Val(A)b=InputBox("请输入b的值") b=Val(B)x=InputBox("请输入x的值") x=Val(x) a=a+b+x Loop Print a End sub 程序运行后,单击命令按钮,依次在输入对话框中输入10、8、9、2、11、-1,则输出结果为 ______。A.15B.14C.13D.12
考题
以下程序运行时,输入3和4后输出的结果是______。 Private Sub Command1_Click() a=InputBox(“请输入a的值”) b=InputBox(“请输入b的值”) Print a+b End SubA.3+4B.7C.34D.12
考题
在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() x=0 Do Until x=-1 a=InputBox("请输入A的值") a=Val(A)b=InputBox("请输入B的值") b=Val(B)x=InputBox("请输入x的值") x=Val(x) a=a+b+x Loop Print a End Sub 程序运行后,单击命令按钮,依次在输入对话框中输入5、4、3、2、1、-1,则输出结果为 ______。A.2B.3C.14D.15
考题
在窗体上添加一个命令按纽,名为COMgAND1,事件过程如下: Private Sub CQmmand1_Click() x =0 Do Until c = -1 a=InputBox(“请输入a的值”) a=Val (A) b=InputBox(“请输入b的值”) b=Val(B) c=InputBox(“请输入c的值”) c=Val (C) a=a+b+c Loop Print a End Sub程序运行后,单击命令按纽,依次在输入对话框中输入5,4,3,2,1,-1后,输出的结果是______ 。A.2B.3C.4D.5
考题
设在工程中有一个标准模块,其中定义了如下记录类型 Type Books Name As String*10 TelNum As String*20 End Type 在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1_Click时, 在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是______。A.Private Sub Command1_Click() Dim B As Books Open "c:\Person.txt" For Output As #1 B.Name=InputBox("输入姓名") B.TelNum=InputBox("输入电话号码") Write #1,B.Name,B.TelNum Close #1 End SubB.Private Sub Command1_Click() Dim B As Books Open "c:\Person.txt" For Input As #1 B.Name=InputBox("输入姓名") B.TelNum=InputBox("输入电话号码") Print #1, B.Name, B.TelNum Close #1 End SubC.Private Sub Command1_Click() Dim B As Books Open "c:\Person.txt" For Output As #1 B.Name=InputBox("输入姓名") B.TelNum=InputBox("输入电话号码") Write #1, B Close #1 End SubD.Private Sub Command1_Click() Dim B As Books Open "c:\Person.txt" For Input As #1 Name=InputBox("输入姓名") TelNum=InputBox("输入电话号码") Print #1, Name, TelNum Close #1 End Sub
考题
有如下事件过程: Private Sub Command1_Click() b=10 Do Until b=-1 a=InputBox("请输入a的值") a=Val(A)b=InputBox("请输入b的值") b=Val(B)a=a * b Loop Print aEnd Sub程序运行后,依次输人数值30,20,10,-1,输出结果为A.6000B.-10C.200D.-6000
考题
假定在工程文件中有一个标准模块,其中定义了如下记录类型: Type Books Name As String*10 TelNum As String*20 End Type 要求当执行事件过程Command1_Click时,在顺序文件Person. txt中写入一条记录。下列能够完成该操作的事件过程是______。A.Private Sub Command1_Click() Dim B As Books Open"c:\Person. txt" For Output As #1 B. Name=InputBox("输入姓名") B. TelNum=InputBox("输入电话号码") Write #1, B. Name, B. TelNum Close #1 End SubB.Private Sub Command1_Click() Dim B As Books Open"c:\Person txt" For Output As #1 B. Name=InputBox("输入姓名") B. TelNum=InputBox("输入电话导码") Print #1, B. Name, B. TelNum Close #1 End SubC.Private Sub Command1_Click() Dim B As Books Open"c:\Person. txt" For Output As #1 Name=InputBox("输入姓名") TelNum=InputBox("输入电话号码") Print #1, B Close #1 End SubD.Private Sub Command1_Click() Dim B As Books Open "c:\Person txt" For Output As #1 Name=InputBox("输入姓名") TelNum=InputBox("输入电话号码") Print #1, B Name, B. TelNum Close #1 End Sub
考题
单选题Private Sub Command1_Click() a=Val(InputBox("请输入a的值=")) b=Val(InputBox("请输入a的值=")) x=a+b Ifa>b Then x=a-b End If Print x End Sub 若运行时从键盘输入a和b分别为3和4,则程序输出的结果为()A
1B
7C
10D
11
热门标签
最新试卷