Now I have a task to do (yes for homework) but I have the main idea how it works.
Basically, I have n. And let's say it's 75.
Now my mission is to find the max square that I can subtract from the number.
Since 9 * 9 is = 81 and 75 > 81 is false I have to check another number.
8 * 8 = 64. 75 > 64 n = 75 - 64
Now my n is 11. And I have to find other.
It wouldn't be hard if it wouldn't ask me to find the higher square.
How do I do that?