tideman.c
void add_pairs(void)
{
    for (int i = 0; i < candidate_count; i++)
    {
        for (int j = 0; j < candidate_count; j++)
        {
            if (preferences[i][j] > preferences[j][i])
            {
                pairs[pair_count].winner = i;
                pairs[pair_count].loser = j;
                //printf("Winner:%s, Loser:%s\n",candidates[pairs[pair_count].winner],candidates[pairs[pair_count].loser]);
                pair_count += 1;
            }
        }
    }
    //printf("%i\n",pair_count);
    return;
}
// Record pairs of candidates where one is preferred over the other
Record pairs of candidates where one is preferred over the other
Record pairs of candidates where one is preferred over the other
void add_pairs(void)
{
    for (int i = 0; i < candidate_count; i++)
    {
        for (int j = 0; j < candidate_count; j++)
        {
            if (preferences[i][j] > preferences[j][i])
            {
                pairs[pair_count].winner = i;
                pairs[pair_count].loser = j;
                pair_count += 1;
            }
        }
    }
    return;
}
void add_pairs ( void ) { for ( int i = 0 ; i < candidate_count ; i ++ ) { for ( int j = 0 ; j < candidate_count ; j ++ ) { if ( preferences [ i ] [ j ] > preferences [ j ] [ i ] ) { pairs [ pair_count ] . winner = i ; pairs [ pair_count ] . loser = j ; pair_count += 1 ; } } } return ; }
Record pairs of candidates where one is preferred over the other
Record pairs of candidates where one is preferred over the other
//printf("Winner:%s, Loser:%s\n",candidates[pairs[pair_count].winner],candidates[pairs[pair_count].loser]); //printf("%i\n",pair_count);