Public Structure StudentData
Console.WriteLine("Welcome to the marks analysis system menu page.")
Console.WriteLine("Please enter 1 to Enter the data for the students.")
Console.WriteLine("Please enter 2 to display the results for the class average, maximum, and minimum.")
Console.WriteLine("Please enter 3 to search for the data of a particulr student.")
Console.WriteLine("To exit the program please enter -1")
menu = Console.ReadLine()
Console.WriteLine("Please enter a valid menu page, or enter -1 to exit program.")
Dim Data(3) As StudentData
Console.WriteLine("--------------------------------------------------------------------------------------------")
Console.WriteLine("Please enter data in the structure Student ID, English Mark, Science Mark, Maths Mark.")
Console.WriteLine("Make sure to use a comma and then a space ', ' ")
Console.WriteLine("Please input data for student " & i + 1 & ".")
Dim temp As String = Console.ReadLine()
Dim temparr() As String = temp.Split(", ")
While temparr(0) < 10000 Or temparr(0) > 99999 Or temparr(1) > 100 Or temparr(2) > 100 Or temparr(3) > 100
Console.WriteLine("Please re-input values, not all values were valid.")
temp = Console.ReadLine()
temparr = temp.Split(", ")
Data(i).English = temparr(1)
Data(i).Science = temparr(2)
Data(i).Maths = temparr(3)
Console.Write(Data(i).ID.ToString + " ")
Console.Write(Data(i).English.ToString + " ")
Console.Write(Data(i).Science.ToString + " ")
Console.Write(Data(i).Maths.ToString + " ")