vb.net中 listbox内所有数据的和
1个回答
展开全部
Dim a(14) As Integer
For i = 1 To 14
a(i) = Int(Rnd() * 90) + 10
ListBox1.Items.Add(a(i))
Next
Dim b(14) As Integer
Dim sum As Integer = 0
For i = 1 To 14
b(i) = ListBox1.Items.Item(i - 1)
sum = sum + b(i)
Next
Dim avg As Double
avg = sum / 14
MsgBox(avg)
我写的可以,你可以把代码贴出来看看
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询