RosettaCodeData/Task/Perfect-numbers/Forth/perfect-numbers.fth
2023-07-01 13:44:08 -04:00

6 lines
88 B
Forth

: perfect? ( n -- ? )
1
over 2/ 1+ 2 ?do
over i mod 0= if i + then
loop
= ;