题型:综合题 题类:模拟题 难易度:困难
浙江省浦江县高级中学2021届高三上学期信息技术1月仿真模拟考试试卷
Private sub command1_click()
Dim a(1 to 20) as integer,b(1 to 20) as integer,i as integer
Dim j as integer,t as integer,p as integer,k as integer,xiaofen as integer
‘从文本框读取AB两队各场的比分分别存数组a、b,场次k,代码略
For i=1 to k-1
For j= 1 to ①
If ② then
t=a(j):a(j)=a(j+1):a(j+1)=t
t=b(j):b(j)=b(j+1):b(j+1)=t
End if
Next j
Next i
p=0 : xiaofen=0
For i=1 to k
If a(i)>b(i) then ③
xiaofen = xiaofen+a(i)-b(i)
List1.Additem str(a(i)) + “:”+ str(b(i))
Next i
If p*2>k or k=p*2 and xiaofen>0 then
Text2.text = “A队获胜”
Elseif then
Text2.text = “B队获胜”
Else
Text2.text = “两队平局”
End if
End sub
① ② ③
原始数据 | 65 | 57 | 59 | 44 | 45 | 69 |
第1遍 | 44 | 65 | 57 | 59 | 45 | 69 |
第2遍 | 44 | 45 | 55 | 57 | 59 | 69 |
第3遍 | 44 | 45 | 57 | 65 | 59 | 69 |
… | … | … | … | … | … | … |
试题篮