# How to solve a equation with floor in it?

I tried to do everything I could, but I don't know what to do with that floor.

$58 = y\cdot\left[\frac{80}{y}\right]$

Where $[x]$ is floor function.

-

## 1 Answer

HINT:

So, $\frac{58}y= \left[\frac{80}{y}\right]$ which is an integer

$\implies y$ must divide $58$

-
Ok, now I know how to do my homework, but in freetime I'm a programmer and now I thought about a way of using it in my program, but I would need to do something to have y only on one side. Is it possible? If not then i'm gonna find diffrent way of doing it. –  10HeadLess Jun 8 '13 at 13:33
I'm currently thinking about a way of calculating b from a mod b = c I have a and c. I think that this would fit it, because if a would be equal 80 and c would be 22, then you would get: 80 mod i = 22, so 80 - i*[80/i] = 22, so 22-80 = -i*[80/i], so 58 = i*[80/i] –  10HeadLess Jun 8 '13 at 13:35
@10HeadLess, you iterate for the values of $y,$ such that $y\cdot \left[\frac{80}{y}\right]=58$ Clearly, $-58\le y \le 58$ Which programing language you follow? –  lab bhattacharjee Jun 8 '13 at 13:41
i am using java –  10HeadLess Jun 8 '13 at 13:44
void process() { for (int y = -100; y < 100; y++) { if (y != 0) { double floor = Math.floor(80 / y); if (y * (int) floor == 58) { System.out.println(y); } } } } –  lab bhattacharjee Jun 8 '13 at 13:47