I'm having a hard time seeing where I went wrong with my two functions IS_TIE and PRINT_WINNER when I put my code through check50, for print_winner I get: "did not print winner of election" and "did not print winner of election and then return true" for is_tie I get: "did not return false"
code is as follows
bool print_winner(void)
{
// TODO
for (int i = 0; i < candidate_count; i++)
{
if (!candidates[i].eliminated && candidates[i].votes > voter_count / 2)
{
printf("%s Wins!\n", candidates[i].name);
return true;
}
}
return false;
}
bool is_tie(int min)
{
// TODO
for (int i = 0; i < candidate_count; i++)
{
if (!candidates[i].eliminated && candidates[i].votes == min)
{
return true;
}
}
return false;
}