Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
6
Task/Odd-word-problem/Forth/odd-word-problem.fth
Normal file
6
Task/Odd-word-problem/Forth/odd-word-problem.fth
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
: word? dup [char] . <> over bl <> and ;
|
||||
: ?quit dup [char] . = if emit quit then ;
|
||||
: eatbl begin dup bl = while drop key repeat ?quit ;
|
||||
: even begin word? while emit key repeat ;
|
||||
: odd word? if key recurse swap emit then ;
|
||||
: main cr key eatbl begin even eatbl space odd eatbl space again ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue