Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,30 @@
' Trabb Pardo-Knuth algorithm
' Used "magic numbers" because of strict specification of the algorithm.
dim s(10)
print "Enter 11 numbers."
for i = 0 to 10
print i + 1;
input " => "; s(i)
next i
print
' Reverse
for i = 0 to 10 / 2
tmp = s(i)
s(i) = s(10 - i)
s(10 - i) = tmp
next i
'Results
for i = 0 to 10
print "f("; s(i); ") = ";
r = f(s(i))
if r > 400 then
print "overflow"
else
print r
end if
next i
end
function f(n)
f = sqr(abs(n)) + 5 * n * n * n
end function