more useful options | |
PerlMonks |
Re: calc percentageby hdb (Monsignor) |
on Mar 13, 2019 at 09:32 UTC ( [id://1231202]=note: print w/replies, xml ) | Need Help?? |
5% is shorthand for 0.05. Therefore, 5% of 50000 is 0.05 * 50000 = 2500. More generally: x% is shorthand for x/100. Therefore, x% of y is x / 100 * y.
In Section
Seekers of Perl Wisdom
|
|