2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
20
Task/Comma-quibbling/ZX-Spectrum-Basic/comma-quibbling.zx
Normal file
20
Task/Comma-quibbling/ZX-Spectrum-Basic/comma-quibbling.zx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
10 DATA 0
|
||||
20 DATA 1,"ABC"
|
||||
30 DATA 2,"ABC","DEF"
|
||||
40 DATA 4,"ABC","DEF","G","H"
|
||||
50 FOR n=10 TO 40 STEP 10
|
||||
60 RESTORE n: GO SUB 1000
|
||||
70 NEXT n
|
||||
80 STOP
|
||||
1000 REM quibble
|
||||
1010 LET s$=""
|
||||
1020 READ j
|
||||
1030 IF j=0 THEN GO TO 1100
|
||||
1040 FOR i=1 TO j
|
||||
1050 READ a$
|
||||
1060 LET s$=s$+a$
|
||||
1070 IF (i+1)=j THEN LET s$=s$+" and ": GO TO 1090
|
||||
1080 IF (i+1)<j THEN LET s$=s$+", "
|
||||
1090 NEXT i
|
||||
1100 PRINT "{";s$;"}"
|
||||
1110 RETURN
|
||||
Loading…
Add table
Add a link
Reference in a new issue