summaryrefslogtreecommitdiff
path: root/wk3/pset/runoff
diff options
context:
space:
mode:
Diffstat (limited to 'wk3/pset/runoff')
-rw-r--r--wk3/pset/runoff/runoff.c8
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++;
+ }
}
}
}