第四部分 模拟试题

模拟试卷一

一、单项选择

CABABB“文本文件(*.txt|*.txtCBA

二、判断

NYNYYNYNNNNYNNN

三、基础填空

事件驱动    Sqr((x+y)/(c*Exp(-5)))      Int(Rnd*100)       Or     3

a<>0 And b*b-4*a*c>=0        String     局部变量    二进制文件

Form1.Scale(-150,100)-(100,-100)       True

List1.List(List1.ListCount-1)          (x Mod 10)*10+x\10    2324

Pattern

四、程序填空

ADBDCBC

五、程序阅读

5

 

x1=13  y1=10

a1=13  b1=10

x2=7   y1=8

a2=13  b2=8

 

a=2    b=1

a=3    b=2

a=4    b=3

a=5    b=4

 

7   4

六、程序设计

Private Sub Form_Click()

    Dim s!, t!, n%

    s = 1

    t = 1

    n = 1

    Do

        n = n + 1

        t = -t / ((2 * n - 2) * (2 * n - 1))

        s = s + t

    Loop While Abs(t) > 0.000001

    Print s

End Sub

 

Private Sub Command1_Click()

    Dim i%

    Randomize

    For i = 1 To 10

        List1.AddItem Str(Int(Rnd * 90) + 10)

    Next i

    List2.Clear

End Sub

Private Sub Command2_Click()

    Dim i%

    i = 0

    Do While i <= List1.ListCount - 1

        If Val(List1.List(i)) Mod 2 = 0 Then

            List2.AddItem List1.List(i)

            List1.RemoveItem i

        Else

            i = i + 1

        End If

    Loop

End Sub

模拟试卷二

一、判断题

NYNNNNNYNNYNNYN

二、填空题

Sqr(x*x+2*y)+Sin(30/180*3.14)/(x-y)       a Mod x=0 And a Mod y=0

True    Int(Rnd*90)+10 2122     传值    传址    List1.Clear 500

&   -    (400,-250)  True    ShiftCtrl   0

三、选择题

B最后两句CDCBDBDB

四、程序阅读题

b=1

b=-1

b=-1

b=100

 

2   5   9

 

s=45

 

Derxw a123

五、程序选择题

BACBCAD

六、编程题

Public Function g(x As Single) As Single

    Dim i%, t!

    If x >= -1 And x <= 1 Then

        g = 1

        t = 1

        For i = 1 To 10

            t = t * x * x

            g = g + t / (2 * i + 1)

        Next i

    Else

        g = 0

    End If

End Function

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

    If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then

        KeyAscii = 0

    ElseIf KeyAscii = 13 Then

        Command1_Click

    End If

End Sub

Private Sub Command1_Click()

    Dim i%

    For i = LBound(a) To UBound(a)

        If a(i) = Val(Text1) Then

            Label1 = "" & i & ""

            Exit For

        End If

    Next i

    If i > UBound(a) Then Label1 = "没有找到!"

End Sub

模拟试题三

一、选择题

DCBBAACC

二、判断题

YNNYYYNNYY

三、填空题

-18    True    Int(Rnd*41)+10    1/3.14*Sqr(b*b-4*a*c)

2*x+y*y>=0 And 2*x+y*y<=18        Mid(txtInput,1,1)Left(txtInput,1)

txtOutput.SetFocus 属性    方法    事件    事件驱动

n Mod 4=0 And n Mod 100<>0 Or n Mod 400=0

aaa 1,1.2Call aaa(1,1.2)

画一个左上角坐标(10,10),右下角坐标(100,100)的矩形        Click

List1.AddItem “Visual Basic程序设计

四、程序阅读

AABABCABCD

 

F2g3,C4d5

 

A

   B B

C C C

D  D D D

 

a=9    b=4

五、程序填空

Input     Not Eof(1)    Close#1

b<t And Not Find           t=m-1      b=m+1

n-n1      Prime(n2)       n Mod k=0     Prime=Yes

六、综合编程

Private Sub Form_Click()

    Dim x%, a%, b%, i%

    Randomize

    a = 0

    b = 0

    For i = 1 To 100

        x = Int(Rnd * 90) + 10

        If x Mod 2 = 0 Then

            a = a + x

        Else

            b = b + x

        End If

    Next i

    Print "偶数和:"; a, "奇数和:"; b

 End Sub

 

Dim a() As Integer, n%

Private Sub Text1_KeyPress(KeyAscii As Integer)

    If KeyAscii = 13 Then

        n = n + 1

        ReDim Preserve a(n)

        a(n) = Text1

        Pict1.Print a(n); " ";

        If n Mod 5 = 0 Then Pict1.Print

        Text1 = ""

    End If

End Sub

Private Sub Cmd1_Click()

    Dim i%, j%, temp%, p%

    For i = 1 To n - 1

        p = i

        For j = i + 1 To n

            If a(p) > a(j) Then p = j

        Next j

        temp = a(i)   a(i) = a(p)  a(p) = temp

    Next i

    For i = 1 To n

    Pict2.Print a(i); " ";

    If i Mod 5 = 0 Then Pict2.Print

    Next i

End Sub

Private Sub Cmd2_Click()

    Pict1.Cls

    Pict2.Cls

    n = 0

End Sub

模拟试题四

一、判断题

YYNYYYYNYN

二、单选题

ABDCBDBCABABAAB

三、填空题

3   (x\10) Mod 10     28      True

Pic1.Circle(Pic1.ScaleWidth/2,Pic1.ScaleHeight/2),700

窗体模块    标准模块    类模块      事件    -

四、程序阅读

a=1    b=1

a=3    b=2

a=7    b=4

a=15   b=8

 

w=4    w=13    w=135      w=31

 

NO. 3          2

NO. 4          3

NO. 5          5

NO. 6          8

NO. 7          13

 

36

25

16

9

4

1

0

交换后

0

1

4

9

4

1

0

五、程序填空

Mid(str1,I,1)       p=j     p<>I    cmdEnd.Enabled=True

cmdStart.Enabled=False

n-x    Next x       flag=True      flag

六、综合编程

Private Sub Form_Click()

    Dim m%, n%

    Do

        m = Val(InputBox("m="))

        n = Val(InputBox("n="))

    Loop Until m >= n And n >= 0

    Print fact(m) / (fact(n) * fact(m - n))

End Sub

Public Function fact(x As Integer) As Single

    Dim i%

    fact = 1

    For i = 1 To x

        fact = fact * i

    Next i

End Function

 

Private Sub Command1_Click()

    Dim i%

    For i = 0 To List1.ListCount - 1

        If List1.List(i) = Text1 Then Exit For

    Next i

    If i > List1.ListCount - 1 Then

        List1.AddItem Text1

        Text2 = Str(List1.ListCount)

    End If

End Sub

Private Sub Command2_Click()

    List1.RemoveItem List1.ListIndex

    Text2 = Str(List1.ListCount)

End Sub

Private Sub Command3_Click()

    List1.Clear

End Sub

Private Sub Command4_Click()

    End

End Sub