Module modAverage
Sub Main()
Dim total As Integer
Dim gradeCounter As Integer
Dim grade As Integer
Dim average As Double
total = 0
gradeCounter = 1
While gradeCounter <= 10
grade = 12
total += grade
gradeCounter += 1
End While
average = total / 10
Console.WriteLine("Class average is {0}", average)
End Sub
End Module
|