Trabb Pardo–Knuth algorithm: Difference between revisions

Added 11l
(Added 11l)
Line 24:
# ''Print and show the program in action from a typical run here''. (If the output is graphical rather than text then either add a screendump or describe textually what is displayed).
<br><br>
 
=={{header|11l}}==
{{trans|Python}}
 
<lang 11l>F f(x)
R sqrt(abs(x)) + 5 * x ^ 3
 
V s = Array(1..11)
s.reverse()
L(x) s
V result = f(x)
I result > 400
print(‘#.: #.’.format(x, ‘TOO LARGE!’))
E
print(‘#.: #.’.format(x, result))
print()</lang>
 
{{out}}
<pre>
11: TOO LARGE!
10: TOO LARGE!
9: TOO LARGE!
8: TOO LARGE!
7: TOO LARGE!
6: TOO LARGE!
5: TOO LARGE!
4: 322
3: 136.732050808
2: 41.414213562
1: 6
</pre>
 
=={{header|Ada}}==
1,480

edits