>The Number of students in the class
>The total age of the students
>The average age of the students
Here is what iv done, its not working!
Can anyone help please? Thanks v much in advance.
Expand|Select|Wrap|Line Numbers
- Public Sub Main()
- Dim intinput As Integer
- Dim inttotal As Integer
- Dim intstudents As Integer
- Dim intAverage As Integer
- inttotal = 0
- intinput = 0
- Do
- intinput = InputBox("enter the students ages")
- inttotal = intotal + intinput
- intAverage = inttotal / intstudent
- intstudent = instudent
- Loop Until intinput = 0
- Debug.Print "The total age is"; inttotal
- Debug.Print "The number of students is"; intstudent
- Debug.Print "The average age of students is"; intAverage
- End Sub