Dim x(100), a For i = 1 To 100 x(i) = i Next i For Each a In x() s = ss = s + aNextLabel1.Caption = sStatic n As Integer, m As Integerm = 100: n = 0: s = 0For Each x In a If x > n Then n = x If x < m Then m = x s = s + xNextMsgBox "最大值为
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/18 12:35:27
Dim x(100), a For i = 1 To 100 x(i) = i Next i For Each a In x() s = ss = s + aNextLabel1.Caption = sStatic n As Integer, m As Integerm = 100: n = 0: s = 0For Each x In a If x > n Then n = x If x < m Then m = x s = s + xNextMsgBox "最大值为
Dim x(100), a For i = 1 To 100 x(i) = i Next i For Each a In x() s = s
s = s + a
Next
Label1.Caption = s
Static n As Integer, m As Integer
m = 100: n = 0: s = 0
For Each x In a
If x > n Then n = x
If x < m Then m = x
s = s + x
Next
MsgBox "最大值为:" & n & Chr(13) & "最小值为:" & m & Chr(13) & "平均值为:" & s / 10
Dim x(100), a For i = 1 To 100 x(i) = i Next i For Each a In x() s = ss = s + aNextLabel1.Caption = sStatic n As Integer, m As Integerm = 100: n = 0: s = 0For Each x In a If x > n Then n = x If x < m Then m = x s = s + xNextMsgBox "最大值为
Dim x(1 To 100),a,s
For i = 1 To 100
x(i) = i
Next i
For Each a In x
s = s + a
Next
Label1.Caption = s
Dim n As Integer,m As Integer
m = 100:n = 0:s = 0
For Each a In x
If a > n Then n = a
If a < m Then m = a
s = s + a
Next
MsgBox "最大值为:" & n & Chr(13) & "最小值为:" & m & Chr(13) & "平均值为:" & s / 100