Dim students as Integer = 5
Dim studentCount as Integer = 0
Dim ageStudentMars(students), ageStudentSaturn(students), houseStudent(students), rtStudent(students) as Integer
Dim rtStudentMars(students), rtStudentSaturn(students) as Integer
Dim marsStudents, saturnStudents as Integer
Dim saturnAvg, marsAvg as Integer
While not studentCount = students - 3
Console.WriteLine("How old are you (12-16)")
ageStudent(studentCount) = Console.ReadLine()
Loop Until(ageStudent(studentCount) >= 12 and ageStudent(studentCount) <= 16)
Console.WriteLine("What house are you in? 1: Saturn, 2: Mars")
houseStudent(studentCount) = Console.ReadLine()
If houseStudent(studentCount) = 1
Console.WriteLine("What is your reaction time? For saturn students")
rtStudent(studentCount) = Console.ReadLine()
saturnAvg += rtStudent(studentCount)
Loop Until(rtStudent(studentCount) >= 0 and rtStudent(studentCount) <= 999)
Else If houseStudent(StudentCount) = 2
Console.WriteLine("What is your reaction time? For mars students")
rtStudent(studentCount) = Console.ReadLine()
marsAvg += rtStudent(studentCount)
Loop Until(rtStudent(studentCount) >= 0 and rtStudent(studentCount) <= 5)
Loop Until(houseStudent(studentCount) >= 1 and houseStudent(studentCount) <= 2)
studentCount = studentCount + 1
saturnAvg = saturnAvg / saturnStudents
marsAvg = marsAvg / marsStudents
Console.WriteLine("Average reaction time for saturn students: " & saturnAvg)
Console.WriteLine("Average reaction time for mars students: " & marsAvg)
While not studentCount = students - 3
Console.WriteLine("What house are you in? 1: Saturn, 2: Mars")
houseStudent(studentCount) = Console.ReadLine()
If houseStudent(studentCount) = 1
Console.WriteLine("How old are you (12-16)? For Saturn students")
ageStudentSaturn(studentCount) = Console.ReadLine()
If ageStudentSaturn(studentCount) >= 12 and ageStudentSaturn(studentCount) <= 16
Console.WriteLine("What is your reaction time? For Saturn students")
rtStudent(studentCount) = Console.ReadLine()
rtStudentSaturn(studentCount) = rtStudent(studentCount)
saturnAvg += rtStudent(studentCount)
Loop Until(rtStudent(studentCount) >= 0 and rtStudent(studentCount) <= 5)
Loop Until(ageStudentSaturn(studentCount) >= 12 and ageStudentSaturn(studentCount) <= 16)
Else If houseStudent(StudentCount) = 2
Console.WriteLine("What is your reaction time? For mars students")
rtStudent(studentCount) = Console.ReadLine()
marsAvg += rtStudent(studentCount)
Loop Until(rtStudent(studentCount) >= 0 and rtStudent(studentCount) <= 5)
Loop Until(houseStudent(studentCount) >= 1 and houseStudent(studentCount) <= 2)
studentCount = studentCount + 1