How to find the highest number that a number can be divided : <p>Im trying to solve a problem on coding bat and i have to try to find if x number of 1 inch blocks and 
y number of 5 inch blocks 
are able to make a fence of z length</p>

<p>In short im trying to find what's the max number of 5 inch blocks i can use without exceeding Z</p>

<p>Is there a function similar to modulo whereby it returns such a number?</p>
