Radical of an integer: Difference between revisions
Content deleted Content added
PascalABC.NET |
|||
Line 2,428: | Line 2,428: | ||
</pre> |
</pre> |
||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
==Version 1== |
|||
<syntaxhighlight lang="rexx"> |
<syntaxhighlight lang="rexx"> |
||
/* REXX */ |
/* REXX */ |
||
Line 2,573: | Line 2,574: | ||
9 83.6 seconds |
9 83.6 seconds |
||
10 100.6 seconds</pre> |
10 100.6 seconds</pre> |
||
This program is optimized for the task (all primes up to 1000 are specified...) and cannot work for n > 1000000. |
|||
==Version 2== |
|||
Below program uses generic optimized procedures for checking and finding factors and primes. It will work for any n (but for say n > 2000000 it becomes very slow). Main program and procedure Radical are shown, scroll down for the other ones). |
|||
<syntaxhighlight lang="rexx"> |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
</pre> |
|||
=={{header|RPL}}== |
=={{header|RPL}}== |