26 lines
432 B
Plaintext
26 lines
432 B
Plaintext
Procedure.s semiprime(n.i)
|
|
a.i = 2
|
|
c.i = 0
|
|
While c < 3 And n > 1
|
|
If (n % a) = 0
|
|
n / a
|
|
c + 1
|
|
Else
|
|
a + 1
|
|
EndIf
|
|
Wend
|
|
If c = 2
|
|
ProcedureReturn "True" ;#True
|
|
EndIf
|
|
ProcedureReturn "False" ;#False
|
|
EndProcedure
|
|
|
|
OpenConsole()
|
|
For i.i = 0 To 64
|
|
PrintN(Str(i) + #TAB$ + semiprime(i))
|
|
Next i
|
|
|
|
PrintN(#CRLF$ + "--- terminado, pulsa RETURN---"): Input()
|
|
CloseConsole()
|
|
End
|