how to get a % of a number - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to get a % of a number (
/showthread.php?tid=193620)
how to get a % of a number -
The_Gangstas - 26.11.2010
e.g how to get 45% of 215?
in a calculator i would use 215 x 45%
but how to do in it pawn?
Re: how to get a % of a number -
Kyle - 26.11.2010
In a varible,
new final;
final = 245 * 45/100;
Re: how to get a % of a number -
Retardedwolf - 26.11.2010
( 45 / 100 ) * 215
Re: how to get a % of a number -
ExEx - 26.11.2010
215 * 45/100
Re: how to get a % of a number -
Bessensap - 26.11.2010
45/100 * 215