Factors of an integer: Difference between revisions

Content added Content deleted
(→‎{{header|Ruby}}: use Integer.sqrt)
Line 4,803: Line 4,803:


=={{header|Quackery}}==
=={{header|Quackery}}==

Notes:


<code>isqrt</code> returns the integer square root and remainder (i.e. the square root of 11 is 3 remainder 2, because three squared plus two equals eleven.) If the number is a perfect square the remainder is zero. This is used to remove a duplicate factor from the list of factors which is generated when finding the factors of a perfect square.
<code>isqrt</code> returns the integer square root and remainder (i.e. the square root of 11 is 3 remainder 2, because three squared plus two equals eleven.) If the number is a perfect square the remainder is zero. This is used to remove a duplicate factor from the list of factors which is generated when finding the factors of a perfect square.
Line 4,844: Line 4,842:
cr ]</lang>
cr ]</lang>


{{bye}}
{{out}}


<pre> 1: 1
<pre> 1: 1