diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-02-19 20:29:57 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-02-19 20:29:57 +0000 |
commit | ebfa5391ffceb15dfbf2e4ad8741e4893e160423 (patch) | |
tree | dd6b89a2df92ba5b3bf77fa6f0c5c7d51ca60184 /wk3/pset/runoff | |
parent | 555dfa9e431cd137f3dbe6d99fc0231545287457 (diff) |
Mon, Feb 19, 2024, 12:29 PM -08:00
Diffstat (limited to 'wk3/pset/runoff')
-rw-r--r-- | wk3/pset/runoff/runoff.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wk3/pset/runoff/runoff.c b/wk3/pset/runoff/runoff.c index 25e3032..c9ede93 100644 --- a/wk3/pset/runoff/runoff.c +++ b/wk3/pset/runoff/runoff.c @@ -148,8 +148,12 @@ void tabulate(void) { for (int k = 0; k < candidate_count; k++) { - if (!strcmp(preferences[i][j], candidates[k].name)) { - if (candidates[k].eliminated) + if (!strcmp(preferences[i][j], candidates[k].name)) + { + if (!candidates[k].eliminated) + { + candidates[k].votes++; + } } } } |