The assignment is to create a program that gives you your average grade,
(is it just me or do they do one of those in every CSIT class) Then it is
supposed to give you the number of above average grades. I got the first part
easily enough but can't seem to figure out the 2nd part. How do I get it to find
"highgrades", nothing I've tried so far is working;
My code is here,
Public Class Form1
Private Sub btnRecord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRecord.Click
ListBox1.Items.Add(TextBox1.Text)
TextBox1.Clear()
TextBox1.Focus()
End Sub
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim sum As Double = 0
Dim highgrades As Double = 0
If ListBox1.Items.Count > 0 Then
For i As Integer = 0 To ListBox1.Items.Count - 1
sum += CDbl(ListBox1.Items(i))
Next
TextBox2.Text = FormatNumber(sum / ListBox1.Items.Count, 2)
TextBox3.Text = CStr(highgrades)
Else
End If
End Sub
End Class