I’m looking for an algorithm to return the number of parts per 100.
For example, if the part is between 1 to 100 then it return 1. If the part is between 101 to 200 then it should return 2. Final example, if the part is 357 it should return 4.
A simple division will not work and tried modulo but cannot get it to give me the right answer. Can someone help me with this?
You can simply divide by 100 and ceil the value.
What language are you using?
PHP example:
$part = ceil($number/100);