全国计算机二级VB 40 8合一试题答案

更新时间:2023-04-11 11:38:01 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

1~40套模拟试题的简单应用和综合应用的答案

一:

2(1):index n n+2 n f1

2(2):s s,s1 <> str(n)

3:

Private Sub C1_Click()

Dim x As Integer

x = 17999

Do While x < 18000

If isprime(x) Then Exit Do

x = x - 1

Loop

Text1.Text = Str(x)

End Sub

Private Sub C2_Click()

Open App.Path & "\out5.txt" For Output As 1

Print #1, Text1.Text

Close 1

End Sub

二:

2(1):check1.value “”“#”text2.text

2(2):5 x str(x) >

3:

Dim i As Integer, j As Integer, n As Integer

For i = 1 To 7

For j = 1 To 7

If i = 1 Or i = 7 Or j = 1 Or j = 7 Then

Sum = Sum + a(i, j)

If a(i, j) Mod 7 = 0 Then n = n + 1

End If

Next j

Next i

lblFirst.Caption = Str(n)

lblSecond.Caption = Str(Sum)

三:

2(1):<> or num >

2(2):Avg is>=85 is>=60 end select n-1 3:

Dim b(20) As Single, i As Integer, j As Integer

Dim max As Integer

1

1~40套模拟试题的简单应用和综合应用的答案

一:

2(1):index n n+2 n f1

2(2):s s,s1 <> str(n)

3:

Private Sub C1_Click()

Dim x As Integer

x = 17999

Do While x < 18000

If isprime(x) Then Exit Do

x = x - 1

Loop

Text1.Text = Str(x)

End Sub

Private Sub C2_Click()

Open App.Path & "\out5.txt" For Output As 1

Print #1, Text1.Text

Close 1

End Sub

二:

2(1):check1.value “”“#”text2.text

2(2):5 x str(x) >

3:

Dim i As Integer, j As Integer, n As Integer

For i = 1 To 7

For j = 1 To 7

If i = 1 Or i = 7 Or j = 1 Or j = 7 Then

Sum = Sum + a(i, j)

If a(i, j) Mod 7 = 0 Then n = n + 1

End If

Next j

Next i

lblFirst.Caption = Str(n)

lblSecond.Caption = Str(Sum)

三:

2(1):<> or num >

2(2):Avg is>=85 is>=60 end select n-1 3:

Dim b(20) As Single, i As Integer, j As Integer

Dim max As Integer

2

1~40套模拟试题的简单应用和综合应用的答案

一:

2(1):index n n+2 n f1

2(2):s s,s1 <> str(n)

3:

Private Sub C1_Click()

Dim x As Integer

x = 17999

Do While x < 18000

If isprime(x) Then Exit Do

x = x - 1

Loop

Text1.Text = Str(x)

End Sub

Private Sub C2_Click()

Open App.Path & "\out5.txt" For Output As 1

Print #1, Text1.Text

Close 1

End Sub

二:

2(1):check1.value “”“#”text2.text

2(2):5 x str(x) >

3:

Dim i As Integer, j As Integer, n As Integer

For i = 1 To 7

For j = 1 To 7

If i = 1 Or i = 7 Or j = 1 Or j = 7 Then

Sum = Sum + a(i, j)

If a(i, j) Mod 7 = 0 Then n = n + 1

End If

Next j

Next i

lblFirst.Caption = Str(n)

lblSecond.Caption = Str(Sum)

三:

2(1):<> or num >

2(2):Avg is>=85 is>=60 end select n-1 3:

Dim b(20) As Single, i As Integer, j As Integer

Dim max As Integer

3

1~40套模拟试题的简单应用和综合应用的答案

一:

2(1):index n n+2 n f1

2(2):s s,s1 <> str(n)

3:

Private Sub C1_Click()

Dim x As Integer

x = 17999

Do While x < 18000

If isprime(x) Then Exit Do

x = x - 1

Loop

Text1.Text = Str(x)

End Sub

Private Sub C2_Click()

Open App.Path & "\out5.txt" For Output As 1

Print #1, Text1.Text

Close 1

End Sub

二:

2(1):check1.value “”“#”text2.text

2(2):5 x str(x) >

3:

Dim i As Integer, j As Integer, n As Integer

For i = 1 To 7

For j = 1 To 7

If i = 1 Or i = 7 Or j = 1 Or j = 7 Then

Sum = Sum + a(i, j)

If a(i, j) Mod 7 = 0 Then n = n + 1

End If

Next j

Next i

lblFirst.Caption = Str(n)

lblSecond.Caption = Str(Sum)

三:

2(1):<> or num >

2(2):Avg is>=85 is>=60 end select n-1 3:

Dim b(20) As Single, i As Integer, j As Integer

Dim max As Integer

4

1~40套模拟试题的简单应用和综合应用的答案

一:

2(1):index n n+2 n f1

2(2):s s,s1 <> str(n)

3:

Private Sub C1_Click()

Dim x As Integer

x = 17999

Do While x < 18000

If isprime(x) Then Exit Do

x = x - 1

Loop

Text1.Text = Str(x)

End Sub

Private Sub C2_Click()

Open App.Path & "\out5.txt" For Output As 1

Print #1, Text1.Text

Close 1

End Sub

二:

2(1):check1.value “”“#”text2.text

2(2):5 x str(x) >

3:

Dim i As Integer, j As Integer, n As Integer

For i = 1 To 7

For j = 1 To 7

If i = 1 Or i = 7 Or j = 1 Or j = 7 Then

Sum = Sum + a(i, j)

If a(i, j) Mod 7 = 0 Then n = n + 1

End If

Next j

Next i

lblFirst.Caption = Str(n)

lblSecond.Caption = Str(Sum)

三:

2(1):<> or num >

2(2):Avg is>=85 is>=60 end select n-1 3:

Dim b(20) As Single, i As Integer, j As Integer

Dim max As Integer

5

1~40套模拟试题的简单应用和综合应用的答案

一:

2(1):index n n+2 n f1

2(2):s s,s1 <> str(n)

3:

Private Sub C1_Click()

Dim x As Integer

x = 17999

Do While x < 18000

If isprime(x) Then Exit Do

x = x - 1

Loop

Text1.Text = Str(x)

End Sub

Private Sub C2_Click()

Open App.Path & "\out5.txt" For Output As 1

Print #1, Text1.Text

Close 1

End Sub

二:

2(1):check1.value “”“#”text2.text

2(2):5 x str(x) >

3:

Dim i As Integer, j As Integer, n As Integer

For i = 1 To 7

For j = 1 To 7

If i = 1 Or i = 7 Or j = 1 Or j = 7 Then

Sum = Sum + a(i, j)

If a(i, j) Mod 7 = 0 Then n = n + 1

End If

Next j

Next i

lblFirst.Caption = Str(n)

lblSecond.Caption = Str(Sum)

三:

2(1):<> or num >

2(2):Avg is>=85 is>=60 end select n-1 3:

Dim b(20) As Single, i As Integer, j As Integer

Dim max As Integer

6

1~40套模拟试题的简单应用和综合应用的答案

一:

2(1):index n n+2 n f1

2(2):s s,s1 <> str(n)

3:

Private Sub C1_Click()

Dim x As Integer

x = 17999

Do While x < 18000

If isprime(x) Then Exit Do

x = x - 1

Loop

Text1.Text = Str(x)

End Sub

Private Sub C2_Click()

Open App.Path & "\out5.txt" For Output As 1

Print #1, Text1.Text

Close 1

End Sub

二:

2(1):check1.value “”“#”text2.text

2(2):5 x str(x) >

3:

Dim i As Integer, j As Integer, n As Integer

For i = 1 To 7

For j = 1 To 7

If i = 1 Or i = 7 Or j = 1 Or j = 7 Then

Sum = Sum + a(i, j)

If a(i, j) Mod 7 = 0 Then n = n + 1

End If

Next j

Next i

lblFirst.Caption = Str(n)

lblSecond.Caption = Str(Sum)

三:

2(1):<> or num >

2(2):Avg is>=85 is>=60 end select n-1 3:

Dim b(20) As Single, i As Integer, j As Integer

Dim max As Integer

7

1~40套模拟试题的简单应用和综合应用的答案

一:

2(1):index n n+2 n f1

2(2):s s,s1 <> str(n)

3:

Private Sub C1_Click()

Dim x As Integer

x = 17999

Do While x < 18000

If isprime(x) Then Exit Do

x = x - 1

Loop

Text1.Text = Str(x)

End Sub

Private Sub C2_Click()

Open App.Path & "\out5.txt" For Output As 1

Print #1, Text1.Text

Close 1

End Sub

二:

2(1):check1.value “”“#”text2.text

2(2):5 x str(x) >

3:

Dim i As Integer, j As Integer, n As Integer

For i = 1 To 7

For j = 1 To 7

If i = 1 Or i = 7 Or j = 1 Or j = 7 Then

Sum = Sum + a(i, j)

If a(i, j) Mod 7 = 0 Then n = n + 1

End If

Next j

Next i

lblFirst.Caption = Str(n)

lblSecond.Caption = Str(Sum)

三:

2(1):<> or num >

2(2):Avg is>=85 is>=60 end select n-1 3:

Dim b(20) As Single, i As Integer, j As Integer

Dim max As Integer

8

For i = 1 To 20

For j = 1 To 5

b(i) = b(i) + a(i, j)

Next j

b(i) = b(i) / 5

Next i

max = b(1)

For i = 2 To 20

If max < b(i) Then max = b(i)

Next i

Text2.Text = Str(max)

四:

2(1):true abc n form1 form2

2(2):0 sellength t text2.text

3:

For k = 1 To 100

If a(k) Mod 3 = 0 Then

num = num + 1

b(num) = a(k)

End If

Next k

For i = 1 To num - 1

For j = i + 1 To num

If b(i) > b(j) Then

t = b(i)

b(i) = b(j)

b(j) = t

End If

Next j

Next i

五:

2(1):> x < y

2(2):list1,list2 l1.text l1.listindex list1.listcount-1 3:

For i = 1 To n

For j = 1 To n

If i = j Or i + j = 8 Then

If a(i, j) Mod 3 = 0 Then Counter = Counter + 1

End If

If i = j Then Sum = Sum + a(i, j)

Next j

Next i

9

For i = 1 To 20

For j = 1 To 5

b(i) = b(i) + a(i, j)

Next j

b(i) = b(i) / 5

Next i

max = b(1)

For i = 2 To 20

If max < b(i) Then max = b(i)

Next i

Text2.Text = Str(max)

四:

2(1):true abc n form1 form2

2(2):0 sellength t text2.text

3:

For k = 1 To 100

If a(k) Mod 3 = 0 Then

num = num + 1

b(num) = a(k)

End If

Next k

For i = 1 To num - 1

For j = i + 1 To num

If b(i) > b(j) Then

t = b(i)

b(i) = b(j)

b(j) = t

End If

Next j

Next i

五:

2(1):> x < y

2(2):list1,list2 l1.text l1.listindex list1.listcount-1 3:

For i = 1 To n

For j = 1 To n

If i = j Or i + j = 8 Then

If a(i, j) Mod 3 = 0 Then Counter = Counter + 1

End If

If i = j Then Sum = Sum + a(i, j)

Next j

Next i

10

For i = 1 To 20

For j = 1 To 5

b(i) = b(i) + a(i, j)

Next j

b(i) = b(i) / 5

Next i

max = b(1)

For i = 2 To 20

If max < b(i) Then max = b(i)

Next i

Text2.Text = Str(max)

四:

2(1):true abc n form1 form2

2(2):0 sellength t text2.text

3:

For k = 1 To 100

If a(k) Mod 3 = 0 Then

num = num + 1

b(num) = a(k)

End If

Next k

For i = 1 To num - 1

For j = i + 1 To num

If b(i) > b(j) Then

t = b(i)

b(i) = b(j)

b(j) = t

End If

Next j

Next i

五:

2(1):> x < y

2(2):list1,list2 l1.text l1.listindex list1.listcount-1 3:

For i = 1 To n

For j = 1 To n

If i = j Or i + j = 8 Then

If a(i, j) Mod 3 = 0 Then Counter = Counter + 1

End If

If i = j Then Sum = Sum + a(i, j)

Next j

Next i

11

For i = 1 To 20

For j = 1 To 5

b(i) = b(i) + a(i, j)

Next j

b(i) = b(i) / 5

Next i

max = b(1)

For i = 2 To 20

If max < b(i) Then max = b(i)

Next i

Text2.Text = Str(max)

四:

2(1):true abc n form1 form2

2(2):0 sellength t text2.text

3:

For k = 1 To 100

If a(k) Mod 3 = 0 Then

num = num + 1

b(num) = a(k)

End If

Next k

For i = 1 To num - 1

For j = i + 1 To num

If b(i) > b(j) Then

t = b(i)

b(i) = b(j)

b(j) = t

End If

Next j

Next i

五:

2(1):> x < y

2(2):list1,list2 l1.text l1.listindex list1.listcount-1 3:

For i = 1 To n

For j = 1 To n

If i = j Or i + j = 8 Then

If a(i, j) Mod 3 = 0 Then Counter = Counter + 1

End If

If i = j Then Sum = Sum + a(i, j)

Next j

Next i

12

For i = 1 To 20

For j = 1 To 5

b(i) = b(i) + a(i, j)

Next j

b(i) = b(i) / 5

Next i

max = b(1)

For i = 2 To 20

If max < b(i) Then max = b(i)

Next i

Text2.Text = Str(max)

四:

2(1):true abc n form1 form2

2(2):0 sellength t text2.text

3:

For k = 1 To 100

If a(k) Mod 3 = 0 Then

num = num + 1

b(num) = a(k)

End If

Next k

For i = 1 To num - 1

For j = i + 1 To num

If b(i) > b(j) Then

t = b(i)

b(i) = b(j)

b(j) = t

End If

Next j

Next i

五:

2(1):> x < y

2(2):list1,list2 l1.text l1.listindex list1.listcount-1 3:

For i = 1 To n

For j = 1 To n

If i = j Or i + j = 8 Then

If a(i, j) Mod 3 = 0 Then Counter = Counter + 1

End If

If i = j Then Sum = Sum + a(i, j)

Next j

Next i

13

For i = 1 To 20

For j = 1 To 5

b(i) = b(i) + a(i, j)

Next j

b(i) = b(i) / 5

Next i

max = b(1)

For i = 2 To 20

If max < b(i) Then max = b(i)

Next i

Text2.Text = Str(max)

四:

2(1):true abc n form1 form2

2(2):0 sellength t text2.text

3:

For k = 1 To 100

If a(k) Mod 3 = 0 Then

num = num + 1

b(num) = a(k)

End If

Next k

For i = 1 To num - 1

For j = i + 1 To num

If b(i) > b(j) Then

t = b(i)

b(i) = b(j)

b(j) = t

End If

Next j

Next i

五:

2(1):> x < y

2(2):list1,list2 l1.text l1.listindex list1.listcount-1 3:

For i = 1 To n

For j = 1 To n

If i = j Or i + j = 8 Then

If a(i, j) Mod 3 = 0 Then Counter = Counter + 1

End If

If i = j Then Sum = Sum + a(i, j)

Next j

Next i

14

For i = 1 To 20

For j = 1 To 5

b(i) = b(i) + a(i, j)

Next j

b(i) = b(i) / 5

Next i

max = b(1)

For i = 2 To 20

If max < b(i) Then max = b(i)

Next i

Text2.Text = Str(max)

四:

2(1):true abc n form1 form2

2(2):0 sellength t text2.text

3:

For k = 1 To 100

If a(k) Mod 3 = 0 Then

num = num + 1

b(num) = a(k)

End If

Next k

For i = 1 To num - 1

For j = i + 1 To num

If b(i) > b(j) Then

t = b(i)

b(i) = b(j)

b(j) = t

End If

Next j

Next i

五:

2(1):> x < y

2(2):list1,list2 l1.text l1.listindex list1.listcount-1 3:

For i = 1 To n

For j = 1 To n

If i = j Or i + j = 8 Then

If a(i, j) Mod 3 = 0 Then Counter = Counter + 1

End If

If i = j Then Sum = Sum + a(i, j)

Next j

Next i

15

For i = 1 To 20

For j = 1 To 5

b(i) = b(i) + a(i, j)

Next j

b(i) = b(i) / 5

Next i

max = b(1)

For i = 2 To 20

If max < b(i) Then max = b(i)

Next i

Text2.Text = Str(max)

四:

2(1):true abc n form1 form2

2(2):0 sellength t text2.text

3:

For k = 1 To 100

If a(k) Mod 3 = 0 Then

num = num + 1

b(num) = a(k)

End If

Next k

For i = 1 To num - 1

For j = i + 1 To num

If b(i) > b(j) Then

t = b(i)

b(i) = b(j)

b(j) = t

End If

Next j

Next i

五:

2(1):> x < y

2(2):list1,list2 l1.text l1.listindex list1.listcount-1 3:

For i = 1 To n

For j = 1 To n

If i = j Or i + j = 8 Then

If a(i, j) Mod 3 = 0 Then Counter = Counter + 1

End If

If i = j Then Sum = Sum + a(i, j)

Next j

Next i

16

lblFirst.Caption = Str(Counter)

lblSecond.Caption = Str(Sum)

六:

2(1): 2 true flag

2(2): 0 sellength t text2.text

3:

For k = 1 To 100

For i = 2 To a(k) - 1

If a(k) Mod i = 0 Then Exit For

Next i

If i = a(k) Then

num = num + 1

b(num) = a(k)

End If

Next k

七:

2(1):true height false

2(2):tmp*a tmp xn(t,i) str(z)

3:

Dim i As Integer, min As Integer

Dim b(40) As Integer, n As Integer

For i = 1 To 40

If prime(arr(i)) Then

n = n + 1

b(n) = arr(i)

End If

Next i

min = b(1)

For i = 2 To n

If min > b(i) Then min = b(i)

Next i

Label3.Caption = Str(n)

Label4.Caption = Str(min)

八:

2(1):len asc b 2 x(i).caption 2(2):la.listcount la la

3: eof(1) str(a(i))

Dim i As Integer, j As Integer, t As Integer

For i = 1 To 9

For j = i + 1 To 10

If a(i) > a(j) Then

17

lblFirst.Caption = Str(Counter)

lblSecond.Caption = Str(Sum)

六:

2(1): 2 true flag

2(2): 0 sellength t text2.text

3:

For k = 1 To 100

For i = 2 To a(k) - 1

If a(k) Mod i = 0 Then Exit For

Next i

If i = a(k) Then

num = num + 1

b(num) = a(k)

End If

Next k

七:

2(1):true height false

2(2):tmp*a tmp xn(t,i) str(z)

3:

Dim i As Integer, min As Integer

Dim b(40) As Integer, n As Integer

For i = 1 To 40

If prime(arr(i)) Then

n = n + 1

b(n) = arr(i)

End If

Next i

min = b(1)

For i = 2 To n

If min > b(i) Then min = b(i)

Next i

Label3.Caption = Str(n)

Label4.Caption = Str(min)

八:

2(1):len asc b 2 x(i).caption 2(2):la.listcount la la

3: eof(1) str(a(i))

Dim i As Integer, j As Integer, t As Integer

For i = 1 To 9

For j = i + 1 To 10

If a(i) > a(j) Then

18

lblFirst.Caption = Str(Counter)

lblSecond.Caption = Str(Sum)

六:

2(1): 2 true flag

2(2): 0 sellength t text2.text

3:

For k = 1 To 100

For i = 2 To a(k) - 1

If a(k) Mod i = 0 Then Exit For

Next i

If i = a(k) Then

num = num + 1

b(num) = a(k)

End If

Next k

七:

2(1):true height false

2(2):tmp*a tmp xn(t,i) str(z)

3:

Dim i As Integer, min As Integer

Dim b(40) As Integer, n As Integer

For i = 1 To 40

If prime(arr(i)) Then

n = n + 1

b(n) = arr(i)

End If

Next i

min = b(1)

For i = 2 To n

If min > b(i) Then min = b(i)

Next i

Label3.Caption = Str(n)

Label4.Caption = Str(min)

八:

2(1):len asc b 2 x(i).caption 2(2):la.listcount la la

3: eof(1) str(a(i))

Dim i As Integer, j As Integer, t As Integer

For i = 1 To 9

For j = i + 1 To 10

If a(i) > a(j) Then

19

lblFirst.Caption = Str(Counter)

lblSecond.Caption = Str(Sum)

六:

2(1): 2 true flag

2(2): 0 sellength t text2.text

3:

For k = 1 To 100

For i = 2 To a(k) - 1

If a(k) Mod i = 0 Then Exit For

Next i

If i = a(k) Then

num = num + 1

b(num) = a(k)

End If

Next k

七:

2(1):true height false

2(2):tmp*a tmp xn(t,i) str(z)

3:

Dim i As Integer, min As Integer

Dim b(40) As Integer, n As Integer

For i = 1 To 40

If prime(arr(i)) Then

n = n + 1

b(n) = arr(i)

End If

Next i

min = b(1)

For i = 2 To n

If min > b(i) Then min = b(i)

Next i

Label3.Caption = Str(n)

Label4.Caption = Str(min)

八:

2(1):len asc b 2 x(i).caption 2(2):la.listcount la la

3: eof(1) str(a(i))

Dim i As Integer, j As Integer, t As Integer

For i = 1 To 9

For j = i + 1 To 10

If a(i) > a(j) Then

20

lblFirst.Caption = Str(Counter)

lblSecond.Caption = Str(Sum)

六:

2(1): 2 true flag

2(2): 0 sellength t text2.text

3:

For k = 1 To 100

For i = 2 To a(k) - 1

If a(k) Mod i = 0 Then Exit For

Next i

If i = a(k) Then

num = num + 1

b(num) = a(k)

End If

Next k

七:

2(1):true height false

2(2):tmp*a tmp xn(t,i) str(z)

3:

Dim i As Integer, min As Integer

Dim b(40) As Integer, n As Integer

For i = 1 To 40

If prime(arr(i)) Then

n = n + 1

b(n) = arr(i)

End If

Next i

min = b(1)

For i = 2 To n

If min > b(i) Then min = b(i)

Next i

Label3.Caption = Str(n)

Label4.Caption = Str(min)

八:

2(1):len asc b 2 x(i).caption 2(2):la.listcount la la

3: eof(1) str(a(i))

Dim i As Integer, j As Integer, t As Integer

For i = 1 To 9

For j = i + 1 To 10

If a(i) > a(j) Then

21

本文来源:https://www.bwwdw.com/article/1dpl.html

Top