resumos/cursos/cs50/all-challenges/problems/runoff/runoff.c
bool vote(int voter, int rank, string name)
{
    bool validCandidate = false;
    for (int i = 0; i < candidate_count; i++)
    {
        if (strcmp(name, candidates[i].name) == 0)
        {
            preferences[voter][rank] = i;
            validCandidate = true;
            break;
        }
    }
    return validCandidate;
}
// Record preference if vote is valid

Record preference if vote is valid
Record preference if vote is valid
bool vote(int voter, int rank, string name)
{
    bool validCandidate = false;
    for (int i = 0; i < candidate_count; i++)
    {
        if (strcmp(name, candidates[i].name) == 0)
        {
            preferences[voter][rank] = i;
            validCandidate = true;
            break;
        }
    }
    return validCandidate;
}
bool vote ( int voter , int rank , string name ) { bool validCandidate = false ; for ( int i = 0 ; i < candidate_count ; i ++ ) { if ( strcmp ( name , candidates [ i ] . name ) == 0 ) { preferences [ voter ] [ rank ] = i ; validCandidate = true ; break ; } } return validCandidate ; }
Record preference if vote is valid
Record preference if vote is valid