dim CountVotes(4), Students, NomCan, Vote, count, count1, count2, count3, count4, winvote, nomwin, percent(4), votercount, absent as Integer
dim Tutor, NameCan(4), win(4), voterNom(35), voters(35) as string
Console.WriteLine("Tutor group: ")
Tutor = console.ReadLine()
Console.WriteLine("Number of students: ")
Students = console.ReadLine()
While students > 35 or students < 28
console.writeline("Error, should be between 28 and 35.")
Console.WriteLine("Please enter a valid number....Number of students: ")
students = console.ReadLine()
Console.WriteLine("Number of candidates: ")
NomCan = console.ReadLine()
console.writeline("Error, maximum 4 candidates.")
Console.WriteLine("Please enter a valid number....Number of candidates: ")
NomCan = console.ReadLine()
Console.WriteLine("Names of candidates: ")
NameCan(count) = console.ReadLine()
for count1 = 1 to students
console.writeline("Please enter your voter number.")
voternom(count1) = console.ReadLine()
if voters(35).Contains(voternom(count1)) then
console.writeline ("Error, already voted")
voters(count1) = Voters(count1)
console.writeline("Enter Vote.")
vote = console.readline()
if vote = namecan(1) then
countvotes(1) = countvotes(1) + 1
votercount = votercount + 1
else if vote = namecan(2) then
countvotes(2) = countvotes(2) + 1
votercount = votercount + 1
else if vote = namecan(3) then
countvotes(3) = countvotes(3) + 1
votercount = votercount + 1
else if vote = namecan(4) then
countvotes(4) = countvotes(4) + 1
votercount = votercount + 1
percent(count4) = (countvotes(count4) / votercount) * 100
Console.WriteLine("tutor:" & tutor)
if countvotes(count2) > winvote then
else if countvotes(count2) = win(1) then
win(count2) = namecan(count2)
console.writeline(namecan(count2) & " - " & countvotes(count2) & "votes" & " - " & percent(count2) & "%")
for count = 1 to students
console.writeline("Enter a new vote for the two candidates that are tied.")
vote = console.readline()
if vote = namecan(1) then
countvotes(1) = countvotes(1) + 1
votercount = votercount + 1
else if vote = namecan(2) then
countvotes(2) = countvotes(2) + 1
votercount = votercount + 1
else if vote = namecan(3) then
countvotes(3) = countvotes(3) + 1
votercount = votercount + 1
else if vote = namecan(4) then
countvotes(4) = countvotes(4) + 1
votercount = votercount + 1
Console.WriteLine("tutor:" & tutor)
if countvotes(count3) > winvote then
else if countvotes(count3) = win(1) then
win(count3) = namecan(count3)
percent(count4) = (countvotes(count4) / votercount) * 100
console.writeline(namecan(count3) & " - " & countvotes(count3) & "votes" & " - " & percent(count3) & "%")
absent = Students - (countvotes(1) + Countvotes(2) + Countvotes(3) + Countvotes(4))
console.writeline("There are " & absent & " childeren absent")