Smallest square that begins with n: Difference between revisions

Add BASIC
(Add BASIC)
Line 157:
49 49 7
</pre>
 
=={{header|BASIC}}==
<lang basic>10 FOR I=1 TO 49
20 J=1
30 K=J*J
40 IF K>I THEN K=FIX(K/10): GOTO 40
50 IF K=I THEN PRINT J*J,: GOTO 80
60 J=J+1
70 GOTO 30
80 NEXT I</lang>
{{out}}
<pre> 1 25 36 4 529
64 729 81 9 100
1156 121 1369 144 1521
16 1764 1849 196 2025
2116 225 2304 2401 25
2601 2704 289 2916 3025
3136 324 3364 3481 35344
36 3721 3844 3969 400
41209 4225 4356 441 45369
4624 4761 484 49</pre>
 
=={{header|C}}==
2,119

edits