Percentage
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Don't forget that the result is a floating-point number so round its value downwards.

pawn Код:
GeneralTax = floatround(PayCheck * 0.05, floatround_floor);
You can also multiply it with 0.05 directly to avoid division. For your example, the paycheck is 45 so the 5% of it is 2.25 which makes GeneralTax to be 2.
Thanks mate, Been looking for something like this
Reply


Messages In This Thread
Percentage - by Luicy. - 09.07.2016, 20:03
Re: Percentage - by Konstantinos - 09.07.2016, 20:21
Re: Percentage - by Luicy. - 09.07.2016, 20:25

Forum Jump:


Users browsing this thread: 1 Guest(s)