Dim pupilnumb, candreg As Integer
Dim candnames(3) As String
Console.WriteLine("Welcome to the VOTESYSTEM 2.0 - Credit, Carl Stewrat")
Console.WriteLine(">> Enter The Name Of Your Tutor Group")
tutorname = Console.ReadLine()
Console.WriteLine("You're in, " & tutorname)
Console.WriteLine("Great, Now Enter The Amount Of Students Voting In The Tutor Group")
pupilnumb = Console.ReadLine()
Console.WriteLine("Great, You've Selected, " & pupilnumb & " Students To Vote")
Console.WriteLine("Now, Please Enter The Amount Of Candidates Competing")
candreg = Console.ReadLine()
dim votes(candreg-1, candreg-1) as string
Console.WriteLine("/ERROR/")
Console.WriteLine("There Can Only Be Up To 4 Candidates, Please Try Again")
Console.WriteLine("/ERROR END/")
candreg = Console.ReadLine()
Console.WriteLine("Thank you, You've Selected " & candreg & " Candidates")
For count as integer = 0 To candreg - 1
Console.WriteLine("Please Enter The Names Of The Following Students")
votes(0, count) = Console.ReadLine()
console.Writeline("Great, you've registered, " & candreg & " candidates.")
console.Writeline("You're voting for the following candidates: " & String.join(", ",votes))
Console.WriteLine("You're now able to vote for the candidate of your choice")
Console.writeline("INFO - If you'd like to abstain, please type any word, phrase or key except the candidates name")
Console.WriteLine("/ BEGIN VOTING INPUT /")
Dim voters As New System.Collections.Generic.List(Of String)
For pupilcount = 1 to pupilnumb
console.writeline("Please enter candidate ID")
voteNum = Console.Readline()
while voters.Contains(voteNum)
Console.Writeline("This user has already voted! Please enter your voter number: ")
voteNum = Console.Readline()
Console.writeline("Please enter the name of the candidate which you'd like to vote for")
vote = console.readline()
votes(1, i) = CStr(CInt(votes(1,i))+ 1)
Dim winners As New System.Collections.Generic.List(Of String)
If CInt(votes(1, i)) >= max
If CInt(votes(1, i)) = max
Console.WriteLine("The Winner(s):")
For Each winner As String In winners
Console.Writeline(winner)
Console.Writeline("/ VOTING END /")
Console.Writeline("Voting Statistics:")
Console.Writeline("GENERAL INFORMATION")
Console.Writeline("Class Name: " & tutorname)
Console.Writeline("Class Size: " & pupilnumb)
Console.Writeline("Voting Aplicants: " & candreg)
Console.Writeline("VOTING STATISTICS")
Console.Writeline("Abstain Amount " & abstain)