Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
0
votes
1
answer
32
views
Tabulate not working when more than 1 candidate is eliminated
Here is my Tabulate Function -
void tabulate(void)
{
int j = 0;
for (int i = 0; i < voter_count; i++)
{
if (candidates[preferences[i][j]].eliminated == 1)
{
j++ …
0
votes
0
answers
98
views
Is my vote function correct in Runoff?
I have started runoff and just completed step 1 that is to write the vote function can someone tell me if it's correct? …
0
votes
1
answer
101
views
Tabulate in Runoff
Finally took a break for a few days to think about stuff and I am back at doing psets
Now I am trying to fix the tabulate function, here's my code -
void tabulate(void)
{
for (int i = 0; i < candi …
0
votes
1
answer
70
views
pset 3 Runoff Where is my code wrong?
I have written the functions but I am not sure which one is wrong as I am not getting any output
Here is my code:
// Record preference if vote is valid
bool vote(int voter, int rank, string name)
{
…
0
votes
1
answer
43
views
Please help me by reviewing my logic for Tabulate in Runoff Pset3
Let's say 3 candidates were their initially and A and B got 2 votes each while C got 1 hence C should be eliminated then in the next round we need to see the second preference votes right? As the firs …
0
votes
1
answer
157
views
Vote Function in Runoff
Here's my code
bool vote(int voter, int rank, string name)
{
int j = 0;
for (int i = 0; i < voter_count; i++)
if (strcmp(name, candidates[i].name) == 0)
{
preferences[i][j] …