944,214 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 335
  • VB.NET RSS
Nov 5th, 2009
0

Help with array

Expand Post »
Hey guys need help with this problem that is suppose to read an unspecified number of scores and determines how many scores are above or equal to the average and how many scores are below the average. Enter a negative number to signify the end of the input. Assume that the maximum number of scores is 100. Anyway here is what I have so far. I know I'll need an array for the add button and a calculate that will need to access the array. My teacher is not very helpful. Here is what I have so far. I am completely lost.

VB.NET Syntax (Toggle Plain Text)
  1. Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
  2. Dim getAverage() As Integer = txtAddScore.Text{getAverage1, getAverage2}
  3. Do While getAverage(99) > 0
  4. Loop
  5. End Sub
  6. Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click
  7.  
  8. End Sub
  9. End Class
Similar Threads
Reputation Points: 17
Solved Threads: 0
Junior Poster in Training
songweaver is offline Offline
80 posts
since Mar 2009
Nov 5th, 2009
0
Re: Help with array
Read Generics. The following code snippet will help you to understand the basics of collections (generics).

VB.NET Syntax (Toggle Plain Text)
  1. Dim p As New List(Of Double)
  2. p.Add(10)
  3. p.Add(20)
  4. MsgBox(p.Average())
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Create an event handler for a third party library that I use
Next Thread in VB.NET Forum Timeline: Changing time in datetimepicker





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC