Steady squares: Difference between revisions
→{{header|ABC}}: Better (?) code
(Added ABC) |
(→{{header|ABC}}: Better (?) code) |
||
Line 7:
=={{header|ABC}}==
<syntaxhighlight lang="abc">
HOW TO REPORT n is.steady.square.below power.of.ten:
REPORT ( n * n ) mod power.of.ten = n
HOW TO
IF n is.steady.square.below power.of.ten:
WRITE ( ( ( n << 1 ) ^ "^2 = " ) >> 10 ) ^ ( ( n * n ) >> 1 ) /
PUT 10 IN power.of.ten
Line 21 ⟶ 20:
IF n = power.of.ten:
PUT power.of.ten * 10 IN power.of.ten
</syntaxhighlight>
{{out}}
|