题型:综合题 题类:模拟题 难易度:困难
浙江省杭州二中2017-2018学年高三信息技术选考仿真考试试卷
Dim n As Integer,a(100)As Integer,max As Integer
Private Sub Form_Load() ‘读取原始数据
Dim conn As New ADODB.Connection.rs As New ADODB.Recordset
Dim i As Integer
conn.ConnectionString=”Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=”&App.Path&。”\student.accdb”
conn.Open
Set rs.ActiveConnection=conn
rs.Open“SELECT*FROM DF”
i=0:max=0
Do While Not rs.EOF
i=i+1:n=i
a(i)= ‘①
If a(i)>max Then max=a(i)
rs.MoveNext
Loop
rs.Close:conn.Close
End Sub
Private Sub Command1_Click() ‘去重复值排序
Const t=max
Dim i As Integer,b(t)As Integer
For i=1 To n
B(a(i))=b(a(i))+1
Next i
For i=1 To t
If Then List1.AddItem Str(t-i+1) ‘②
Next i
End Sub
①处加框代码应改为;
②处加框代码应改为。
试题篮