Help with array

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Mar 2009
Posts: 56
Reputation: songweaver is an unknown quantity at this point 
Solved Threads: 0
songweaver songweaver is offline Offline
Junior Poster in Training

Help with array

 
0
  #1
Nov 5th, 2009
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.

  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
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,721
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 495
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven
 
0
  #2
Nov 5th, 2009
Read Generics. The following code snippet will help you to understand the basics of collections (generics).

  1. Dim p As New List(Of Double)
  2. p.Add(10)
  3. p.Add(20)
  4. MsgBox(p.Average())
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC