The problem im having is when it asks the first candidates name, it then asks the amount of votes 5 times.
IN SHORT
Suppose to read:
Please enter name of candidate 1
Please enter votes for candidate 1
Please enter name of candidate 2
Please enter votes for candidate 2
Reads like:
Please enter name of candidate 1
Please enter votes for candidate 1
Please enter votes for candidate 2
Please enter votes for candidate 3
Public Sub candidateArray()
Dim nameArray(4) As String
Dim voteArray(4) As Integer
For nameCounter = 0 To 4
Console.WriteLine("Please enter candidate #" & nameCounter + 1)
nameArray(nameCounter) = Console.ReadLine()
For voteCounter = 0 To 4
Console.WriteLine("Please enter the number of votes for candidate #" & voteCounter + 1)
voteArray(voteCounter) = Console.ReadLine()
Console.WriteLine()
Next
Next
End Sub
End Module

New Topic/Question
Reply



MultiQuote






|