Since 100/5 = 20 all we do is multiply by 20, round up to the nearest whole number, and then divide by 20.
(To round up in MySQL use CEIL)
Example for $1.03:
1.03 * 20 = 20.60
CEIL(20.60) = 21.0000
21 / 20 = 1.0500
NOTE: I also round…
Since 100/5 = 20 all we do is multiply by 20, round up to the nearest whole number, and then divide by 20.
(To round up in MySQL use CEIL)
Example for $1.03:
1.03 * 20 = 20.60
CEIL(20.60) = 21.0000
21 / 20 = 1.0500
NOTE: I also round…
For further actions, you may consider blocking this person and/or reporting abuse
AB Dev Hub -
uttesh -
Arindam Pratap -
Subham -
Top comments (0)