added more examples, project euler

This commit is contained in:
2025-09-15 18:54:31 +01:00
parent 66d257bf83
commit 3f0d61f466
5 changed files with 79 additions and 9 deletions

18
examples/euler-1.zorth Normal file
View File

@@ -0,0 +1,18 @@
: over swap dup rot rot ;
: rem over over / * - ;
0 1
begin
dup 1000 <
while
dup 3 rem 0 = if
dup rot + swap
else dup 5 rem 0 = if
dup rot + swap
else fi
fi
1+
repeat
drop .