VB 2005 Express help: How to add all items listbox and find mean/STD deviation?
I'm trying to do a class lab, but I'm stuck. This is what we have to do: we need to have a listbox where people can put in any number and a button that will compute the mean and another that computes the standard deviation? I don't even know where to begin. can someone please help?
[297 byte] By [
donator] at [2007-11-11 11:56:50]

# 1 Re: VB 2005 Express help: How to add all items listbox and find mean/STD deviation?
I don't want to do your homework for you, but here's a hint:
For Each Item As Object In lstBox.Items
Dim I As Integer = CInt(Item)
Next
That code loops through the items in a listbox, converts each item to an Integer and assigns it to a variable. To complete your assignment, you'll need to save all the integer values in some sort of array or collection, then perform the mean and standard deviation calculations on that collection.
Be sure to check Google (http://www.google.com/search?q=vb+standard+deviation). ;-)
# 2 Re: VB 2005 Express help: How to add all items listbox and find mean/STD deviation?
Welcome to dev-archive :WAVE:
Are you using VB6 or VB.NET?
Hack at 2007-11-11 20:43:46 >

# 4 Re: VB 2005 Express help: How to add all items listbox and find mean/STD deviation?
Hack: Notice the subject. ;-) VB 2005 Express is .NET.That is exactly what I thought too Phil, but I wanted the OP's confirmation before moving it. Now, I don't have to. :)
Hack at 2007-11-11 20:45:51 >
