Dim tVotes() As Integer = {0, 0, 0, 0}
Dim maxVotes As Integer = 0
Console.WriteLine("Please enter the number of students for voting from 0-30.")
maxVotes = Console.ReadLine
If maxVotes < 1 Or maxVotes > 30 Then
Do While maxVotes < 1 Or maxVotes > 30
Console.WriteLine("Please enter a number from 0 to 30.")
maxVotes = Console.ReadLine
Console.WriteLine("Enter the number of candidates.")
Console.WriteLine("Need at least two-four candidates. Press any key to continue")
Console.WriteLine("Please enter at least two-four candidates.")
Console.WriteLine(i + 1 & ") Please enter the candidate name")
cName(i) = Console.ReadLine
Console.WriteLine(i + 1 & ") Please enter the number of the candidate you are voting for:")
Console.WriteLine(h + 1 & ") " & cName(h))
uVotes = Console.ReadLine()
If uVotes > n Or uVotes < 1 Then
Console.WriteLine("Rejected for invalid vote!")
Console.WriteLine(cName(0))
tVotes(0) = tVotes(0) + increment
Console.WriteLine(cName(1))
tVotes(1) = tVotes(1) + increment
Console.WriteLine(cName(2))
tVotes(2) = tVotes(2) + increment
Console.WriteLine(cName(3))
tVotes(3) = tVotes(3) + increment
If tVotes(i) < tVotes(j) Then
If tVotes(0) <> tVotes(1) Then
Console.WriteLine("1) Candidate Name: " & cName(0) & " - NEW CAPTAIN! with " & tVotes(0) & " votes.")
Console.WriteLine(i + 1 & ") Candidate Name: " & cName(i) & " with " & tVotes(i) & " votes.")
Console.WriteLine("NO OVERALL WINNER!")