September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
16
Task/Identity-matrix/ZX-Spectrum-Basic/identity-matrix.zx
Normal file
16
Task/Identity-matrix/ZX-Spectrum-Basic/identity-matrix.zx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
10 INPUT "Matrix size: ";size
|
||||
20 GO SUB 200: REM Identity matrix
|
||||
30 FOR r=1 TO size
|
||||
40 FOR c=1 TO size
|
||||
50 LET s$=CHR$ 13
|
||||
60 IF c<size THEN LET s$=" "
|
||||
70 PRINT i(r,c);s$;
|
||||
80 NEXT c
|
||||
90 NEXT r
|
||||
100 STOP
|
||||
200 REM Identity matrix size
|
||||
220 DIM i(size,size)
|
||||
230 FOR i=1 TO size
|
||||
240 LET i(i,i)=1
|
||||
250 NEXT i
|
||||
260 RETURN
|
||||
Loading…
Add table
Add a link
Reference in a new issue