summaryrefslogtreecommitdiff
path: root/wk3
diff options
context:
space:
mode:
Diffstat (limited to 'wk3')
-rw-r--r--wk3/pset/plurality/plurality.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wk3/pset/plurality/plurality.c b/wk3/pset/plurality/plurality.c
index 0559ac1..19cdd5e 100644
--- a/wk3/pset/plurality/plurality.c
+++ b/wk3/pset/plurality/plurality.c
@@ -78,9 +78,9 @@ bool vote(string name)
// Print the winner (or winners) of the election
void print_winner(void)
{
- string winner;
- for (int i = 0; i < candidate_count - 1; i++) {
- if (winner === undefined)
+ string winners[candidate_count - 1] = candidates[0];
+ for (int i = 1; i < candidate_count - 1; i++) {
+ if (winners)
}
return;
}