diff options
-rw-r--r-- | wk3/pset/runoff/runoff.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/wk3/pset/runoff/runoff.c b/wk3/pset/runoff/runoff.c index 5434132..ac6a067 100644 --- a/wk3/pset/runoff/runoff.c +++ b/wk3/pset/runoff/runoff.c @@ -146,11 +146,11 @@ void tabulate(void) // for (int j = 0; j < candidate_count; j++) { - if (!candidates[preferences[i][j]].eliminated) - { - candidates[preferences[i][j]].votes++; - break; - } + if (!candidates[preferences[i][j]].eliminated) + { + candidates[preferences[i][j]].votes++; + break; + } } } return; @@ -208,7 +208,8 @@ bool is_tie(int min) { if (!candidates[i].eliminated) { - if (candidates[i].votes != min) { + if (candidates[i].votes != min) + { return false; } } @@ -223,7 +224,8 @@ void eliminate(int min) { if (!candidates[i].eliminated) { - if (candidates[i].votes == min) { + if (candidates[i].votes == min) + { candidates[i].eliminated = true; } } |