Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Identity-matrix/ZX-Spectrum-Basic/identity-matrix.basic
Normal file
16
Task/Identity-matrix/ZX-Spectrum-Basic/identity-matrix.basic
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