(提示:AVERAGEIF函数用对区域中满足条件的单元格求平均。例如:=AVERAGEIF(A4:A18,“亚洲”,E4:B18)表示2016年所有亚洲国家的入境人数平均值)
Private Sub Command1_Click()
Dim n As Integer, I As Integer, a As Integer, b As Integer
Randomize
n=Val(Text1. Text)
i= ①
Do While i<=n
a=Int(Rnd*100)
b=Int(Rnd*100)
If ② Then
List1. AddItem“(”+Str(i)+“)”+Str(a)+“+”+Str(b)+“=”
i=i+1
End if
Loop
End sub
① ②