Anonymous user
Semiprime: Difference between revisions
m
→version 2: explained the method used to find semiprimes. -- ~~~~
(J) |
m (→version 2: explained the method used to find semiprimes. -- ~~~~) |
||
Line 311:
===version 2===
The method used is to examine numbers, skipping primes. If composite (the 1<sup>st</sup> factor is prime), then check if the 2<sup>nd</sup> factor is prime. If so, the number is a semiprime.
<lang rexx>/*REXX program determines if any number (or a range) is/are semiprime.*/
parse arg bot top . /*obtain #s from the command line*/
|