ImageVerifierCode 换一换
格式:DOCX , 页数:36 ,大小:21.12KB ,
资源ID:9851302      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/9851302.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(计算机二级VB第6章选择题及答案.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

计算机二级VB第6章选择题及答案.docx

1、计算机二级VB第6章选择题及答案1、 窗体上有一个命令按钮Command1,编写如下事件过程:Private Sub Command1_Click() a = Val(InputBox(请输入分数:, 计算你的等级, 60) If a 100 Then Print 输入错误 ElseIf a 60 Then Print 不及格 ElseIf a Z - X Then z = X + Y If X + Y Z - Y Then X = z + Y Print X, Y, ZA、 3 5 9B、 14 3 11C、 8 3 11D、 8 5 95、 执行下列程序段后输出的结果是()。s = 1Fo

2、r i = 1 To 3 For j = 0 To i - 1 s = s + s * j Next j Print s;Next IA、 1 2B、 2 1C、 2 2 12D、 1 2 126、 窗体上有一个命令按钮command1,编写如下事件过程:Private Sub Command1_Click() Dim i As Integer Dim sum As Integer For i = 1 To i + 99 sum = sum + i i = i + 1 Next i Print sumEnd Sub运行时单击按钮,输出结果是()。A、 编译错误B、 2401C、 2500D、

3、变量sum溢出7、 执行下列程序段后,窗体输出的结果是()。Dim a As Integera = Val(InputBox(请输a的值, , 6)Select Case a Case 1 To 4 Print A Case Is 3 Print B Case 5 To 10 Print C Case Else Print DEnd SelectA、 AB、 BC、 CD、 D8、 有如下程序段:Private Sub Form_Click()Dim s%, t%, a%, b%s = 1: t = 1a = Valb = ValIf a 0 Then s = s + 1If a b Then

4、 t = t + sElse If a = b Then t = 5 Else t = 2 * s End IfEnd IfPrint tEnd Sub要使程序输出结果为4,则a和b应满足的条件是()。A、 a0 and abB、 a0 and a0 and abD、 ab9、 窗体上有一个命令按钮Command1,编写如下事件过程:Private Sub Command1_Click() Dim i%, j%, x%, n% x = 0 n = InputBox() For i = 1 To n For j = 1 To i x = x + j Next j Next i Print xEn

5、d Sub运行时单击命令按钮,如果在输入对话框中输入3,则窗体上显示的内容是()。A、 6B、 10C、 14D、 1810、 已知字母D的ASCII码是68。在窗体上添加命令按钮Command1,并编写如下事件过程,要使单击按钮输出如下结果,程序中空缺的部分应为()。DEDEFEDEFGFEDEFGPrivate Sub Command1_Click()m = 68: a = DPrint aFor i = ( )m = m + 1a = Chr(m) + a + Chr(m)Print aNext iEnd SubA、 0 to 4B、 1 to 3C、 1 to 4D、 1 to 511

6、、 运行下列程序段,其中n=n+1语句被执行的次数是()Dim m%,n%For m=1 to 3For n=1 to 6 Step 2n =n+1Print n NextNextA、 3B、 6C、 9D、 1812、 窗体上有一个命令按钮Command1,编写如下事件过程:Private Sub Command1_Click()For i = 1 To 4 For j = 4 To 8 Sum = Sum + 1 Next jNext iPrint SumEnd Sub运行时单击按钮,输出的结果是()。A、 4B、 8C、 20D、 3213、 执行下列程序段后,x的值是()。n=5:x=

7、1:I=1Dox=x*II=I+1Loop While InA、 10B、 15C、 24D、 12014、 窗体上有一个命令按钮Command1,编写如下事件过程Private Sub Command1_Click() Sum = 0 For m = 1 To 3 Select Case m Case 1 a = 1 Case 2 a = 2 Case 3 a = 3 End Select Print a Sum = Sum + a Next m Print SumEnd Sub单击命令按钮输出结果是()。A、 3 3 3 9B、 3 2 1 6C、 1 1 1 3D、 1 2 3 615、

8、 窗体上有一个命令按钮Command1,编写如下事件过程:Private Sub Command1_Click() a = 0 For m = 1 To 3 a = a + 1 b = 0 For j = 1 To 3 a = a + 1 b = b + 2 Next j Next m Print a, bEnd Sub运行时,单击按钮,输出结果为()。A、 6 6B、 6 18C、 12 6D、 12 1816、 窗体上有一个命令按钮(command1),编写如下事件过程:Private Sub Command1_Click() a = 80: b = 50: c = 30 If a c T

9、hen b = c If b = c And a c Then c = a + b Print a, b, cEnd Sub运行时单击命令按钮,窗体输出的结果是()。A、 80 50 30B、 80 30 30C、 50 30 80D、 50 30 3017、 阅读下列程序段:m = 0For i = 1 To 3 For j = 1 To i m = m + jNext j, i执行以上的循环后,i和m的值分别为()。A、 3 6B、 3 10C、 4 6D、 4 1018、 阅读下列程序段:x = 0For i = 1 To 4 For j = 1 To i X = x + 1Next j

10、, i执行以上的循环后,x的值为()。A、 6B、 9C、 10D、 1619、 如下程序段的功能是计算1/2+1/4+1/6+1/50,并显示结果Private Sub Command1_Click()Dim i As IntegerDim sum As Doublei = 1sum = 0Do While (i0 Then y=1: Print yD、 If xy Then Print y End If21、 窗体上有两个文本框(Text1、Text2)和一个命令按钮(Command1),编写如下事件过程:Private Sub Command1_Click() x = 0 Do Whil

11、e x y Or y z Then x = x - z Print x, y, zA、 70 30 30B、 100 30 30C、 70 80 30D、 100 80 3024、 运行下列程序,单击窗体后输出的结果是()。 Private Sub Form_Click() s = 1 For i = 1 To 2 For j = 0 To i s = s + s * j Print s; Spc(2); Next j Print Next i End SubA、 1 2 4 12B、 1 22 4C、 1 2 2 4 12D、 1 21 2 625、 执行下列程序段后,x的值是()。 n =

12、 5: x = 1: i = 1 Do x = x * i i = i + 1 Loop While i nA、 10B、 15C、 24D、 12026、 在窗体上画一个名称为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、 -5B、 25C、 1D、 -127、 下列程序段是求两个数中的最大数,其中不正确的是()。A、 If a b,a

13、,b) C、 Max = a : If b = a Then Max = bD、 If b = a Then Max = b : Max = a28、 以下程序段的输出结果是()。 M = 24:N = 18 A = M:B = N R = M Mod N Do While R 0 M = N N = R R = M Mod N Loop Print A * B / NA、 6B、 24C、 72D、 43229、 假定有如下事件过程:Private Sub Form_Click() Dim x As Integer, n As Integer x = 1 n = 0 Do While x 3

14、2 x = x * 3 n = n + 1 Loop Print x, nEnd Sub程序运行后,单击窗体,输出结果是()。A、 81 4B、 56 3C、 28 1D、 243 530、 下列程序段的运行结果是()。Private Sub Form_Click() For i = 1 To 5 Select Case i Mod 2 Case 0 Print * Exit For Case 1 Print $ Case Else Print # End Select Next iEnd SubA、 *#B、 $*C、 *$D、 $#31、 如下程序段的功能是:从键盘上输入若干学生的考试分数

15、,当输入负数时结束输入,然后输出其中最高的分数和最低的分数。Private Sub Form_Click() Dim x As Single, mmax As Single, mmin As Single x = InputBox(请输入学生的考试分数) mmax = x mmin = x Do While 1 If 2 Then mmax = x End If If x =0 和xmmaxB、 x=0 和xmminC、 xmmaxD、 x0 和xmmin32、 窗体上有一个文本框Text1和命令按钮Command1,编写如下事件过程:Private Sub Command1_Click()i

16、 = Select Case i Case 1: j = + Case 2: j = - Case 3: j = * Case Else: j = 非法End Select = jEnd Sub运行时,在Text1中输入1后单击命令按钮,Text1中内容是()。A、 +B、 -C、 *D、 非法33、 在窗体上有两个列表框List1、List2,一个命令按钮Command1,有5个列表项,为空,程序运行后,单击Command1,List1和List2中分别有()个字段。Private Sub Command1_Click() Dim i As Integer For i = 1 To - 1

17、(1) = True 1 Next iEnd SubA、 0和5B、 1和4C、 5和0D、 4和134、 窗体上有一个命令按钮Command1,编写如下事件过程:Private Sub Command1_Click() x = InputBox(x) If x 2 = 16 Then y = x If x 2 16 Then y = x 2 + 1 Print yEnd Sub运行时,单击按钮,在输入框中输入6后回车,窗体上将显示()。A、 6B、 C、 37D、 6535、 下列程序段的执行结果是()。n = 1j = 1Do While j = 60 Then i = i + 1 Els

18、eIf a = 70 Then i = i + 2 ElseIf a = 80 Then i = i + 3 ElseIf a = 90 Then i = i + 4 End If Print i=, iEnd SubA、 i=1B、 i=2C、 i=3D、 i=438、 窗体上有一个命令按钮Command1,编写如下事件过程:Private Sub Command1_Click() x = 0 Do While x 10 x = (x - 2) * (x + 3) n = n + 1 LoopEnd Sub运行时单击按钮,n和x的值分别是()。A、 1和0B、 2和24C、 3和50D、 4

19、和6839、 下列循环语句能正常结束循环的是()。A、 i = 5Doi = i + 1Loop Until i 0B、 i = 1Doi = i + 2Loop Until i = 10C、 i = 10Do i = i - 1Loop Until i 0i = 6D、 Do i = i - 2Loop Until i = 140、 执行下列程序段后,x的值是()。n=6:x=1:I=1Dox=x*II=I+1Loop While I= 60 Then i = i + 4 ElseIf a = 70 Then i = i +3 ElseIf a = 80 Then i = i +2 Else

20、If a = 90 Then i = i +1 End If Print i=, iEnd SubA、 i=4B、 i=3C、 i=2D、 i=142、 以下程序段的执行结果是()。n = 2j = 1Do While j b - c Then a = b + c If a - b b - c Then b = a - cPrint a, b, cA、 14 9 14B、 23 9 14C、 23 14 9D、 14 9 546、 执行以下程序段后输出的结果是()。 For i = 1 To 3 x = 4 For j = 1 To 4 x = x + 6 Next j Next iPrint x;A、 16B、 24C、 28D、 2247、 以下程序段的执行结果是()。n = 2j = 1Do While j 4 n = n * j Print n; j = j + 1LoopA、 2 3 4B、 2 6 24C、 2 4 12D、 2 4 848、 运行下列程序,单击窗体后输出的结果是()。 Private Sub Form_Click() s = 1 For i = 1 To 2 For j =

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1