0

I can't find what's wrong with my code but check50 keeps telling me

:( print_winner prints name when someone has a majority
    print_winner did not print winner of election
:( print_winner returns true when someone has a majority
    print_winner did not print winner and then return true

Otherwise I get everything right and it works when i run it myself. So, what's wrong here?:

[removed]

0

You forgot the newline \n after the name of the winner. You might have to change your code a bit to not print an empty line in case of no winner.

And instead of different cases for odd/even, you could simply compare like > voter_count / 2, should work for all.

| improve this answer | |

You must log in to answer this question.

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