100 doors: Difference between revisions

m
Moved Tiny BASIC to thew BASIC section (it was in the wrong place anyway) and fixed the order of some BASICs
(→‎{{header|ALGOL 68}}: Use Mediawiki markup for syntax highlighting, bugfix in the optimised version)
m (Moved Tiny BASIC to thew BASIC section (it was in the wrong place anyway) and fixed the order of some BASICs)
Line 2,207:
60 IF I * I < 100 THEN 30
70 END</syntaxhighlight>
 
==={{header|MSX Basic}}===
Based on the Sinclair ZX81 BASIC implementation.
<syntaxhighlight lang="basic">
10 DIM D(100)
20 FOR I=1 TO 100
30 FOR J=i TO 100 STEP I
40 D(J)=NOT D(J)
50 NEXT J
60 NEXT I
70 FOR I=1 TO 100
80 IF D(I) THEN PRINT I;
90 NEXT I
100 END
</syntaxhighlight>
{{out}}
<pre>
]RUN
1 4 9 16 25 36 49 64 81 100</pre>
 
===QBasic===
Line 2,278 ⟶ 2,297:
180 NEXT I
190 END</syntaxhighlight>
 
==={{Header|Tiny BASIC}}===
<syntaxhighlight lang="tiny basic"> PRINT "Open doors are:"
 
LET I = 1
10 IF I = 100 THEN END
rem funcion SQR
LET B = I*I
rem funcion MODULO
LET A = I - (I / B) * B
IF A < 11 THEN PRINT B
LET I = I + 1
GOTO 10</syntaxhighlight>
 
==={{header|Sinclair ZX81 BASIC}}===
Line 2,290 ⟶ 2,322:
80 IF D(I) THEN PRINT I,
90 NEXT I</syntaxhighlight>
 
==={{header|MSX Basic}}===
Based on the Sinclair ZX81 BASIC implementation.
<syntaxhighlight lang="basic">
10 DIM D(100)
20 FOR I=1 TO 100
30 FOR J=i TO 100 STEP I
40 D(J)=NOT D(J)
50 NEXT J
60 NEXT I
70 FOR I=1 TO 100
80 IF D(I) THEN PRINT I;
90 NEXT I
100 END
</syntaxhighlight>
{{out}}
<pre>
]RUN
1 4 9 16 25 36 49 64 81 100</pre>
 
=={{header|Batch File}}==
Line 13,947 ⟶ 13,960:
100 = open
</pre>
 
=={{Header|Tiny BASIC}}==
<syntaxhighlight lang="tiny basic"> PRINT "Open doors are:"
 
LET I = 1
10 IF I = 100 THEN END
rem funcion SQR
LET B = I*I
rem funcion MODULO
LET A = I - (I / B) * B
IF A < 11 THEN PRINT B
LET I = I + 1
GOTO 10</syntaxhighlight>
 
=={{header|TypeScript}}==
3,025

edits