Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -0,0 +1,30 @@
// Arithmetic Derivative
// https://rosettacode.org/wiki/Arithmetic_derivative#
local fn DoIt( N as short) as short
short L,F,Z
L = 0: F = 3: Z = ABS(N)
IF Z<2 THEN exit fn
1 IF Z MOD 2 = 0 THEN L=L+N\2: Z=Z\2: GOTO 1
2 IF F>Z THEN exit fn
3 IF Z MOD F = 0 THEN L=L+N\F: Z=Z\F: GOTO 2
F=F+2
goto 1
end fn = L
_Window = 1
window _Window,@"Arithmetic Derivative",fn cgrectmake(0,0,640,400)
windowcenter(_Window)
short N,L,LineCount
FOR N = -99 TO 100
L = fn DoIt(N): PRINT USING "########";L;
LineCount ++
if LineCount = 10 then print : LineCount = 0
NEXT
handleevents