Minimum number of cells after, before, above and below NxN squares: Difference between revisions

(Dialects of BASIC moved to the BASIC section.)
Line 450:
90 PRINT
100 NEXT I</syntaxhighlight>
 
==={{header|Minimal BASIC}}===
{{trans|GW-BASIC}}
{{works with|Commodore BASIC|3.5}}
{{works with|Nascom ROM BASIC|4.7}}
<syntaxhighlight lang="basic">
10 REM Minimum number of cells after, before, above and below NxN squares
20 LET N = 10
30 FOR I = 0 TO N-1
40 IF I < N-1-I THEN 70
50 LET D = N-1-I
60 GOTO 80
70 LET D = I
80 FOR J = 0 TO N-1
90 IF J < N-1-J THEN 120
100 LET E = N-1-J
110 GOTO 130
120 LET E = J
130 IF D < E THEN 160
140 LET M = E
150 GOTO 170
160 LET M = D
170 IF M < 10 THEN PRINT " ";
180 PRINT M;
190 NEXT J
200 PRINT
210 NEXT I
220 END
</syntaxhighlight>
 
==={{header|QBasic}}===
512

edits