Dim ClassNumber As Decimal
Dim NumberOfCandidates As Decimal
Console.WriteLine("Enter Class Size")
If Precheck Mod 1 = 0 And Precheck <= 30 And Precheck>0 Then
Console.WriteLine("error, retry")
Console.WriteLine("Enter Number of Candidates")
If Precheck Mod 1 = 0 And Precheck >= 2 And 4 >= Precheck Then
NumberOfCandidates = Precheck
Console.WriteLine("error, retry")
Dim CandidateNames() As Decimal = {1, 2, 3, 4, 5, 6}
Console.WriteLine("Enter Candidate Name")
Console.WriteLine("Input your vote using the numbers stated alongside the candidate's names:")
Console.WriteLine(" - " & CandidateNames(i) & " (" & i & ")")
Dim CandidateScorekeep(4) As Decimal
CandidateScorekeep(1) = 15
CandidateScorekeep(2) = 12
CandidateScorekeep(3) = 10
CandidateScorekeep(4) = 29
dim CandidateScoreKeep2(NumberOfCandidates) as Decimal
Dim Lastmax As Decimal = 100000
For j = 0 To NumberOfCandidates
For i = 1 To NumberOfCandidates
If CandidateScoreKeep(i) > Max And CandidateScoreKeep(i) < LastMax Then
Max = CandidateScoreKeep(i)
elseif CandidateScoreKeep(i) = LastMax
CandidateScoreKeep2(i) = LastMax
Console.WriteLine(CandidateNames(i) & " - Number of Votes: " & CandidateScorekeep(i))
CandidateScoreKeep2(i) = CandidateScorekeep(i)
For i = 1 To NumberOfCandidates
If CandidateScoreKeep(i) >= Max Then
Max = CandidateScoreKeep(i)
For j = 1 To NumberOfCandidates
MaxName = CandidateNames(i)
Console.WriteLine("NO OVERALL WINNER")
Console.WriteLine("NEW CLASS CAPTAIN: " & MaxName)