Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Syntax for each flow:
- ' SOURCE [AMOUNT] TARGET
- ' --------------------------------------------------------------------------
- ' Round 1
- ' Ana got 25 votes, Ben got 20, Che got 15 and Dan got 10.
- ' Ana, Ben and Che were not the least voted candidates,
- ' so they stay for the next round, with all their votes.
- Ana r1 [25] Ana r2
- Ben r1 [20] Ben r2
- Che r1 [16] Che r2
- ' Dan got the least votes (11) and is eliminated.
- ' 5 of his voters picked Ana as second choice,
- ' and 4 picked Ben. None picked Che,
- ' so these remaining 2 votes (5+4+0+2=11) are discarded.
- Dan r1 [5] Ana r2
- Dan r1 [4] Ben r2
- Dan r1 [2] None r2
- ' --------------------------------------------------------------------------
- ' Round 2
- ' Ana now has 25+5=30 votes, Ben has 20+4=24,
- ' and Che remains with his original 16 votes.
- ' Ana and Ben are not the least voted voted candidates,
- ' so they stay for the next round, with all their votes.
- Ana r2 [*] Ana r3
- Ben r2 [*] Ben r3
- ' Che got the least votes (16) and is eliminated.
- ' 11 of his voters picked Ben as a second choice,
- ' and 3 picked Ana,
- ' The remaining 2 votes (11+3+2=15) are discarded.
- Che r2 [3] Ana r3
- Che r2 [11] Ben r3
- Che r2 [*] None r3
- ' Now there are only two candidates,
- ' so the one with the most votes wins, i.e. Ben.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement