dim data(100,4) as string
function repeat(id as string) as boolean
num = Convert.ToInt32(data(i,j))
average(j) = convert.ToString(sum/(cnt-1))
max(j) = convert.ToString(mx)
min(j) = convert.ToString(mn)
console.WriteLine("----------------------------------------")
console.Write("{0,-10}",data(i,j))
console.write("{0,-10}",average(i))
Console.write("{0,-10}",max(i))
Console.write("{0,-10}",min(i))
function inputData() as boolean
if score.length < 4 or score.Length >= 5
while score(0).length <> 5 or repeat(score(0)) = true
console.Writeline("Student ID length must be equal to 5. Please enter again:")
score(0) = console.ReadLine()
console.WriteLine("Student ID already exists! Please enter again:")
score(0)=console.ReadLine()
num = Convert.ToInt32(score(i))
console.Write("Results cannot be greater than 100. Please re-enter result no.")
console.WriteLine(" again:")
data(cnt,i) = convert.ToString(num)
console.WriteLine("Please choose the type of operation(1.input new data / 2.Displaying existent data)")
type = console.readline()
console.WriteLine("Please input the id and results in CSV format:")
while inputData() = false
console.WriteLine("Invalid input format. Please enter again:")
console.Write("Your no.")
console.WriteLine(" set of results has been entered!")
console.writeline("Ending program")