Questions tagged [tabulate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
73 views

Pset 3 runoff. Votes not updating, trying to understand the code sequencing

Ok so im stuck on the tabulate funtion in runoff for pset3. The issue im having is that when i call to "printf" the candidates vote counts the votes still come out as 0. So i dont think the ...
0
votes
1answer
44 views

Pset3 runoff tabulation error

[![enter image description here][1]][1] I keep getting a tabulation error with check50 that I cannot replicate 11 voters, 4 candidates, 3 or 4 rounds of voting works fine with I run it, and debug50 ...
0
votes
1answer
61 views

cs50 pset3 runoff tabulate - why you say candidates[i].votes = 0 ; here?

why use that ?? for (int i = 0; i < candidate_count; i++) { candidates[i].votes = 0; } } return 0;
0
votes
1answer
472 views

tabulate doesn't count votes when multiple candidates are eliminated

for (int i = 0; i < voter_count; i++) { // vote for top-preferred candidate if possible if (candidates[preferences[i][0]].eliminated == false) { candidates[preferences[i][0]]....