Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

count numbers that are below average

$
0
0
I have the calculate average function in another private function, name is AvgScore(). In this step, i have to count how many items in the list box than are below the average of the number return from AvgScore(), then print how many numbers are below average. Absolutely no clue.
Private Function CountScoresBelowAverage()
Dim vintCount As Integer = 1
If
vintCount < AvgScore() then
ListMain.Items.Count = ListMain.Items.Count + 1
End If
Do While vintCount < AvgScore()
vintCount = vintCount + 1
Loop
Return vintCount
End Function

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>