Anonymous user
Binary search: Difference between revisions
m
→{{header|BASIC}}: Dots after messages.
(→{{header|Minimal BASIC}}: Added) |
m (→{{header|BASIC}}: Dots after messages.) |
||
Line 1,505:
IF IndX >= 0 THEN
PRINT " is at index ";
PRINT IndX;
PRINT "."
ELSE
PRINT " is not found."
ENDIF
RETURN
Line 1,547 ⟶ 1,548:
{{out}}
<pre>
2 is at index 4.
5 is not found.
</pre>
Line 1,642 ⟶ 1,643:
200 PRINT X;
210 IF I1 < 0 THEN 240
220 PRINT "is at index"; I1; "."
230 RETURN
240 PRINT "is not found."
250 RETURN
|