Get Percentage of a number

$total is 1232 $number is 238 The out put will show 19%

Divide by zero errors

always do a pre-check to see if the variable contains only a zero, then either make 2 decimal places, (as this may prevent it fitting into the field space given, or round the number after. This will make it two decimal places

Division by zero

Show only whole numbers Floor – Round

Start value 85.66

Makes 85 or

Makes 86

Show only 2 decimal places

Two ways of doing this…be careful…. Best way ..

This now shows 123.00 (it has added two decimal places as zeros, to make up the number) Second way …. (not as good, as it rounds up to 2 decimal places)

This will show 23.12 (and can be added to another number) But…..if the […]