二级VB上机题库12

时长:120分钟 总分:100分

58浏览 0人已完成答题

题型介绍
题型 简答题
数量 10
第23套
一、基本操作题
1.
  
问题详情
2.
  
问题详情
二、简单应用题
3.
   
Private Sub Op1_Click(Index As Integer)
''给考生的程序:
'    Dim a As String, b As String, c As String
'    a = "我坐"
'    b = "我开"
''    Select Case ?
'        Case 0
'            Text1.Text = a + Me.Op1(0).Caption + "去"
'        Case 1
''            Text1.Text = ? + Me.Op1(1).Caption + "去"
'        Case 2
'            Text1.Text = b + Me.Op1(2).Caption + "去"
'    End Select
问题详情
4.
   
'提供给考生的程序
Private Sub Form_Unload(Cancel As Integer)
    Open App.Path & "\out4.txt" For Output As #1
    Print #1, Op1.Value, Op2.Value, Op3.Value, Op4.Value, Text1.Text
    Close #1
End Sub
问题详情
三、综合应用题
5.
   
' 给考生的程序
Private Sub Form_Unload(Cancel As Integer)
    unload_sub
End Sub
问题详情
第24套
一、基本操作题
6.
  
问题详情
7.
   
问题详情
二、简单应用题
8.
   
''给考生的程序
'Private Sub C1_Click()
''    Timer1.Enabled = ?
'End Sub
'Private Sub Timer1_Timer()
'    Static a%
'    a = a + 1
''    If P1.Top > P2.Top + P2.? Then
'        P1.Move P1.Left, P1.Top - 5 - a, P1.Width, P1.Height
'    Else
''        Timer1.? = False
'    End If
'End Sub
问题详情
9.
   
Private Function xn(a As Single, m As Integer)
    Dim i As Integer
    tmp = 1
    For i = 1 To m
    '    tmp = ?
    Next
    'xn = ?
End Function
Private Sub Command1_Click()
    Dim n As Integer
    Dim i As Integer
    Dim t As Single
    Dim s, x As Single
    n = Val(Text1.Text)
    x = Val(Text2.Text)
    z = 0
    For i = 2 To n
        t = x + i
    '    z = z +?
    Next
    'Label1.Caption = ?
    Call SaveResult
End Sub
Private Sub SaveResult()
    Open App.Path & "\out4.dat" For Output As #1
    Print #1, Label1.Caption
    Close #1
End Sub
问题详情
三、综合应用题
10.
   
Private arr(100) As Integer
Private Sub Command1_Click()
    Open App.Path & "\in5.txt" For Input As #1
    For i = 1 To 40
        Input #1, arr(i)
    Next
    Close #1
End Sub
Private Sub Command2_Click()
'=================考生编写程序开始===================
???
'=================考生编写程序结束====================
    Open App.Path & "\out5.txt" For Output As #1
    Print #1, Label3.Caption, Label4.Caption
    Close #1
End Sub
Public Function prime(x As Integer)
    k = Int(Sqr(x) + 0.5)
    For i = 2 To k
        If x Mod i = 0 Then
            prime = False
            Exit Function
        End If
    Next
    If i > k Then prime = True
End Function
问题详情