题型:综合题 题类:常考题 难易度:困难
浙江省名校协作体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
加密规则如下表所示:
原字 |
A |
B |
C |
… |
X |
Y |
Z |
a |
b |
c |
… |
x |
y |
z |
密字 |
z |
y |
x |
… |
c |
b |
a |
Z |
Y |
X |
… |
C |
B |
A |
注:“A”的ASCⅡ码值是65,“a”的ASCI码值是97。
试题篮