Sorry about the no code tags, I'm new and I didn't know, so thanks. And thanks for the reply.
Okay... sooo
There are no errors or warnings. Only the unreferenced local variable for MaxVotesIndex.
the output is supposed to look like this:
Enter the candidate's name: Alice
How many votes: 1234
Enter the candidate's name: Bob
How many votes: 8765
Enter the candidate's name: Carlos
How many votes: 456
Enter the candidate's name: Debbie
How many votes: 3456
Enter the candidate's name: Edward
How many votes: 678
1 2 3 4 5 6
|
Candidates NumVotes % of Votes
Alice 1234 8.46
Bob 8764 60.08
Carlos 456 3.13
Debbie 3456 23.69
Edward 678 4.65
|
The winner is: Bob
________________________
However, mine looks like this
Enter the candidate's name: Alice
How many votes: 1234
Enter the candidate's name: Bob
How many votes: 8765
Enter the candidate's name: Carlos
How many votes: 456
Enter the candidate's name: Debbie
How many votes: 3456
Enter the candidate's name: Edward
How many votes: 678
1 2 3 4 5 6
|
Candidates NumVotes % of Votes
Alice12344.80988
Bob876544.80988
Carlos4564.80988
Debbie34564.80988
Edward6784.80988
|
and i don't know how to find maxVotesIndex so I don't have an output for winner... I really need help.