0

int find_min(void) { int min = voter_count;

for (int i = 0; i < candidate_count; i++)
{
    if (candidates[i].eliminated == false && candidates[i].votes < min)
    {
         min = candidates[i].votes;
    }
}
return 0;

}

1

the function you wrote will return 0 back to the main function regardless of what values you've assign to other variables within the find_min function.

| improve this answer | |
  • yes thanks! i realised that eventually :D all good now – andream Jun 22 at 18:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .