Dim a(4)
Private Sub Command1_Click()
Randomize
For i = 0 To 4
a(i) = Int(Rnd * 20) + 80
Text1(i).Text = a(i)
Next
End Sub
Private Sub Command2_Click()
For i = 0 To 4
For j = 0 To i
If a(i) < a(j) Then t = a(i): a(i) = a(j): a(j) = t
Next
Next
Label1.Caption = a(4)
Label2.Caption = a(0)
Label3.Caption = Format((a(1) + a(2) + a(3)) / 3, "##.00")
End Sub
dim nMin,nMax
dim a,cnt
nMin = 100
nMax = 0
for i = 0 to 4
a = int(rnd*20+80)
if a < nmin then nmin = a
if a > nmax then nmax = a
txtNum5(i) = a '输出框5个用控件数组,名字txtNum5
cnt = cnt + a
next
txtMin.text = nMin
txtMax.text = nMax
txtAvg.text = (cnt-nmin-nmax)/3
晕,。这需要写代码计算。命令。还有设计好界面的。哪有10分钟能搞定