RosettaCodeData/Task/Loops-While/Forth/loops-while.fth
2023-07-01 13:44:08 -04:00

5 lines
87 B
Forth

: halving ( n -- )
begin dup 0 >
while cr dup . 2/
repeat drop ;
1024 halving