Without a loop.
Get the square root of your number. Round up the result and square it.
Square root is a slow process, so I have no idea if this would be faster or slower.
Get the square root of your number. Round up the result and square it.
Square root is a slow process, so I have no idea if this would be faster or slower.