Jump to content

Almost prime: Difference between revisions

m
(add RPL)
m (→‎{{header|RPL}}: formatting)
Line 4,202:
'''NEXT'''
k == 1 FS? AND SWAP DROP
≫ ≫ ''''<span style="color:blue">KPRIM'''</span>' STO
≪ 5 1 '''FOR''' k
{ } 2
'''WHILE''' OVER SIZE 10 < '''REPEAT'''
'''IF''' DUP k '''<span style="color:blue">KPRIM'''</span> '''THEN''' SWAP OVER + SWAP '''END'''
1 + '''END''' DROP
-1 '''STEP'''
≫ ''''<span style="color:blue">TASK'''</span>' STO
|
'''<span style="color:blue">KPRIM'''</span> ''( n k -- boolean ) ''
Dim f As Integer = 0
For i As Integer = 2 To n
1,151

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.