Say for example, that I want the highest multiple of 36 below 100. Is there a function that allows me to generate this with two arbitrary numbers?
Asked
Active
Viewed 48 times
0
-
4$36\left\lfloor \frac{100}{36}\right\rfloor$. – André Nicolas Feb 05 '16 at 23:21
1 Answers
2
If $x$ the number whose multiple you're trying to find and $y$ is the upper bound what you're looking for is $$x{\left\lfloor{ y\over x}\right\rfloor}$$
where $\lfloor\cdot\rfloor$ is the floor function.
Jack's wasted life
- 8,849