Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Semiprime/Icon/semiprime.icon
Normal file
9
Task/Semiprime/Icon/semiprime.icon
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
link "factors"
|
||||
|
||||
procedure main(A)
|
||||
every nf := semiprime(n := !A) do write(n," = ",nf[1]," * ",nf[2])
|
||||
end
|
||||
|
||||
procedure semiprime(n) # Succeeds and produces the factors only if n is semiprime.
|
||||
return (2 = *(nf := factors(n)), nf)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue