题型:综合题 题类:常考题 难易度:困难
浙江省温州市新力量联盟2017-2018学年高二下学期信息技术期末考试试卷
Dim kh(1 to 500) As string,cj(1 to 500) As Integer Dim n As Integer ‘参加考试总人数
Private Sub Form_Load()
Dim conn as new ADODB.connection:Dim rs As New ADODB.Recordset
conn.ConnectionString=“Provider=Microsoft.ACE.OLEDB.12.0;Data Source=”
+App.Path+”\BSCJ.accdb”
conn.Open
set rs.activeconnection=conn
rs.Open“select*FROM scoreinfo”
‘本过程其他代码略 End Sub
Private Sub Command1_Click()
Dim m As Integer,i As Integer,j As Integer
Dim t1 As Integer,t2 As String,flag As Boolean For i = 1 To n-1 ‘排序
For j = ① If cj(i)<cj(j) Then
t1 = cj(i):cj(i) = cj(j):cj(j) = t1
t2 = kh(i):kh(i) = kh(j):kh(j) = t2 Elseif cj(i) = cj(j) And kh(i) > kh(j) Then
t2 = kh(i):kh(i) = kh(j):kh(j) = t2
End If Next j
Next i
m = ②
If m <= n Then ‘统计进入面试人数
i = m
flag = False
Do While ③ If cj(i) = cj(i+1) Then
i = i+1 Else
flag = True End If
Loop
Text2.text = Str(cj(m)) Text3.text = Str(i)
For j = 1 To i
List2.AddItem kh(j) + “ ” + Str(cj(i)) Next j
Else
Text2.Text=”面试人数超过总人数了” End If
End Sub
② ③
试题篮