Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,33 @@
PROGRAM "Identity matrix"
VERSION "0.0000"
DECLARE FUNCTION Entry ()
FUNCTION Entry ()
DO
n = SBYTE(INLINE$("Enter size of matrix: "))
LOOP UNTIL n > 0
DIM identity[n, n] '' all zero by default
' enter 1s in diagonal elements
FOR i = 1 TO n
identity[i, i] = 1
NEXT i
' print identity matrix if n < 40
PRINT
IF n < 40 THEN
FOR i = 1 TO n
FOR j = 1 TO n
PRINT identity[i, j];
NEXT j
PRINT
NEXT i
ELSE
PRINT "Matrix is too big to display on 80 column console"
END IF
END FUNCTION
END PROGRAM