A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
7
Task/Loops-Break/BASIC/loops-break-1.bas
Normal file
7
Task/Loops-Break/BASIC/loops-break-1.bas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
do
|
||||
a = int(rnd * 20)
|
||||
print a
|
||||
if a = 10 then exit loop 'EXIT FOR works the same inside FOR loops
|
||||
b = int(rnd * 20)
|
||||
print b
|
||||
loop
|
||||
5
Task/Loops-Break/BASIC/loops-break-2.bas
Normal file
5
Task/Loops-Break/BASIC/loops-break-2.bas
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
10 FOR l = 1 TO 20
|
||||
20 IF l = 10 THEN LET l = 20: GO TO 40: REM terminate the loop
|
||||
30 PRINT l
|
||||
40 NEXT l
|
||||
50 STOP
|
||||
Loading…
Add table
Add a link
Reference in a new issue