I am trying to create a small voting system in a smart contract where a vote is passed when the majority of admins have voted. I now realise that this is not as easy as I thought, as there are no floats in Solidity, so I cannot simply do (voteCount/adminCount)*100 > 50. I noticed the problem when I tried to do (2/3)*100 and it results in 0.
How is something like this usually solved? Didn't pay much attention in math classes back in school, so the Google searches I've done on the topic didn't help me much.
adminCount. – Ismael Sep 26 '21 at 15:41voteCount(the count of all votes) ? I don't understand why voteCount could be lower than adminCount – Olivier Boissé Sep 26 '21 at 16:10