题型:综合题 题类:模拟题 难易度:困难
浙江省绍兴市上虞区2020届高三下学期信息技术第二次教学质量调测卷
Const n=640
Dim class(1 to n )As String
Dim score(0 to n) As Integer
‘从数据库中读取学号和成绩数据,存入class和Score数组,并在Lis2中显示,代码略
Private Sub Command1Click()
Dim x As integer, m AS Integer, i As Integer,j As Integer
Dim t1 As Integer, t2 As Integer, flag As Boolean
x=Val(Text1.Text)
m=Val(Text2.Text)
i=1: flag=True
Do While flag
k=i
For j=i+1 To n
If t=x Then
It score (j)>score(k) Or Val(Mid(class(k),1,2))<>x Then k=j
End If
Next j
IfAnd score(k) <> score(i-1) Then flag=Fale
If k<>i Then
t1=sore(i): score(i)=score(k): score(k)=t1
t2=class(i): class(i)=class(k): class(k)=t2
End If
i=i+1
Loop
List1.Clear
For j=1 To
List1.Additem class(j)+""+Str(score(j))
Next j
End Sub
试题篮