VB二级考复习资料-2012_3.docVIP

  • 1
  • 0
  • 约6.66千字
  • 约 7页
  • 2018-03-23 发布于河南
  • 举报
VB二级考复习资料-2012_3

浙江省高等学校计算机等级考试 二级VB程序设计复习资料 目 录 四、浙江省09年秋二级考试VB笔试试卷 1 五、浙江省10年春二级考试VB笔试试卷 6 六、浙江省11年春二级考试VB笔试试卷 11 同济大学浙江学院 2012年3月 四、浙江省09年秋二级考试VB笔试试卷 一、程序阅读与填空(24小题,每小题3分,共72分) 1. 阅读下列程序说明和程序,在每小题提供的若干可选答案中,挑选一个正确答案。 【程序说明】输入n、x(x的绝对值必须小于1)后,计算并显示下列表达式的值。 【程序】 Private Sub Command1_Click() Dim y As Single, x As Single, t As Single Dim n As Integer, i As Integer, f As Integer n = InputBox(n=) Do x = InputBox(x=) Loop ____(1)_______ 必须是1 否则重输 y = 1: ____(2)_______ For i = 2 To ____(3)_____ t = -t * x y = ____(4)_______ 循环内s=s+变量 求和 Next i Print y End Sub 【供选择的答案】 (1)A、While Abs(x)1 B、While x-1 And x1 C、Until Abs(x)1 D、until x1 (2)A、t=-x/2 B、t=-1 C、t=0 D、t=1 (3)A、n-2 B、n C、n-1 D、n+1 (4)A、y+t/i B、t*i C、t/i D、y+t*i 2. 阅读下列程序说明和程序,在每小题提供的若干可选答案中,挑选一个正确答案。 【程序说明】单击Command1后计算List1中所有数的平均值,清空列表框控件List2中所有表项后将List1中所有小于平均值的数据写入到List2(如下图所示)。 【程序】 Private Sub Command1_Click() Dim n As Integer, i As Integer, s As Single, v As Single n = ____(5)____ ______(6)______ For i = 1 To n a(i) = ______(7)______: v = v + a(i) Next i v = v / n: ______(8)______ For i = 1 To n If a(i) v Then List2.AddItem a(i) Next i End Sub 【供选择的答案】 (5)A、List1.ListCount-1 B、List1. ListCount C、List1. ListIndex D、List1.Count (6)A、Redim a(n-1) B、Dim a(n)As Single C、ReDim a(n)As Single D、Dim a(n) (7)A、List1.List(i-1) B、List1.List(i) C、List1.Text D、List1.List(i+1) (8)A、List2.Move B、List2.List=”” C、List2.Cls D、List2.Clear 3. 阅读下列程序说明和程序,在每小题提供的若干可选答案中,挑选一个正确答案。 【程序说明】运行时初态如下图所示,Text2、Text3、Command1不可用。输入姓名按回车Text2可用,输入学号按回车Text3可用,输入成绩按回车“保存”按钮可用,按“保存”将数据添加到文件e:\score.txt、界面恢复初态。退出前可继续输入、保存数据。 【程序】 Private Sub f() 子过程 ______(9)______ Text1.Text = : Text1.Enabled = True Text2.Text = : Text2.Enabled = False Text3.Text = : Text3.Enabled = False

文档评论(0)

1亿VIP精品文档

相关文档