How can I calculate percentage of a number in solidity? say I want to calculate 95% of the number 200.
How should I go about doing that ?
It is hard to calculate exact number by division in computer.
If just you want to get 95% of 200, 200/100 * 95 is the answer. But if you ask how can i get exact number of result of division, it can't in some number.
(200 * 95) / 100? – Adrin Jul 10 '20 at 04:42Will return exactly the same result.
– pasevin Aug 06 '21 at 07:26