Smallest square that begins with n: Difference between revisions
Smallest square that begins with n (view source)
Revision as of 19:57, 14 February 2023
, 1 year ago→bc: add
(→Python: add a simpler alternative) |
(→bc: add) |
||
Line 346:
<pre>Igual que la entrada de FreeBASIC.</pre>
=={{header|bc}}==
<syntaxhighlight lang="bc">for (q = a = 1; c != 49; q += a += 2) {
for (k = q; k != 0; k /= 10) if (k < 50) {
if (m[k] != 0) break
m[k] = q
c += 1
}
}
for (k = 1; k != 50; ++k) m[k]</syntaxhighlight>
=={{header|BQN}}==
Line 364 ⟶ 375:
45369 4624 4761 484 49
┘</pre>
=={{header|C}}==
<syntaxhighlight lang="c">#include <stdio.h>
|