Semiprime: Difference between revisions

Line 566:
=={{header|Pascal}}==
Simple test with trial division to get small factors.
Tested with freepascal.
 
<lang pascal>program SemiPrime;
{$Mode objfpc}// compiler switch to use result
 
function SmallFactor (p: LongWord):longWord;
//result = p if prime
Anonymous user