tideman.c
void print_winner(void)
{
    // TODO
    int count = 0;
    string name;

    // Find the source which basically means a column in the
    // locked matrix that has all falses ( meaning no losses at all)

    for (int i = 0; i < candidate_count; i++)
    {
        for (int j = 0; j < candidate_count; j++)
        {
            if (locked[j][i] == false)
            {
                count += 1;
            }
        }
        if (count == candidate_count)
        {
            name = candidates[i];
        }
        else
        {
            count = 0;
        }
    }

    printf("%s\n", name);
    return;
}
// Print the winner of the election
Print the winner of the election
Print the winner of the election
void print_winner(void)
{
    int count = 0;
    string name;
    for (int i = 0; i < candidate_count; i++)
    {
        for (int j = 0; j < candidate_count; j++)
        {
            if (locked[j][i] == false)
            {
                count += 1;
            }
        }
        if (count == candidate_count)
        {
            name = candidates[i];
        }
        else
        {
            count = 0;
        }
    }
    printf("%s\n", name);
    return;
}
void print_winner ( void ) { int count = 0 ; string name ; for ( int i = 0 ; i < candidate_count ; i ++ ) { for ( int j = 0 ; j < candidate_count ; j ++ ) { if ( locked [ j ] [ i ] == false ) { count += 1 ; } } if ( count == candidate_count ) { name = candidates [ i ] ; } else { count = 0 ; } } printf ( " \n " , name ) ; return ; }
Print the winner of the election
Print the winner of the election
// TODO // Find the source which basically means a column in the // locked matrix that has all falses ( meaning no losses at all)