题型:综合题 题类:常考题 难易度:困难
浙江省名校协作体2018-2019学年高二上学期信息技术9月联考试卷
Private Sub Command1_Click()
Dim n As Integer '裁判人数
Dim max As Integer, min As Integer, sum As Integer
Dim AveScore As Single '存储最终得分
n = Val(Text1.Text): sum = 0
If n <= 2 Then MsgBox ("输入数据要大于2,请重新输入!")
If n > 2 Then
List1.Clear
Randomize
score = Int(Rnd() * 31) + 70
List1.AddItem Str(score)
max = score
min = score
For i = 2 To n
score = Int(Rnd() * 31) + 70
List1.AddItem Str(score)
If score > max Then max = score
If score < min Then min = score
sum = sum + score
Next i
AveScore =
Text2.Text = Str(AveScore)
End If
End Sub
位置 |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
数据 |
64 |
67 |
45 |
145 |
|
269 |
|
|
|
119 |
1275 |
试题篮