Steady squares: Difference between revisions
Add SETL
(→{{header|Euler}}: Sybntax highlight with Mediawiki markup) |
Not a robot (talk | contribs) (Add SETL) |
||
Line 2,381:
time(ms): 7
</pre>
=={{header|SETL}}==
<syntaxhighlight lang="setl">program steady_squares;
loop for n in [1..10000] | steady n do
print(str n + "^2 = " + str (n**2));
end loop;
op steady(n);
return n**2 mod 10**#str n = n;
end op;
end program;</syntaxhighlight>
{{out}}
<pre>1^2 = 1
5^2 = 25
6^2 = 36
25^2 = 625
76^2 = 5776
376^2 = 141376
625^2 = 390625
9376^2 = 87909376</pre>
== {{header|TypeScript}} ==
|