Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
26
Task/Identity-matrix/QBasic/identity-matrix.basic
Normal file
26
Task/Identity-matrix/QBasic/identity-matrix.basic
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
SUB inicio(identity())
|
||||
FOR i = LBOUND(identity,1) TO UBOUND(identity,1)
|
||||
FOR j = LBOUND(identity,2) TO UBOUND(identity,2)
|
||||
LET identity(i,j) = 0
|
||||
NEXT j
|
||||
LET identity(i,i) = 1
|
||||
NEXT i
|
||||
END SUB
|
||||
|
||||
SUB mostrar(identity())
|
||||
FOR i = LBOUND(identity,1) TO UBOUND(identity,1)
|
||||
FOR j = LBOUND(identity,2) TO UBOUND(identity,2)
|
||||
PRINT identity(i,j);
|
||||
NEXT j
|
||||
PRINT
|
||||
NEXT i
|
||||
END SUB
|
||||
|
||||
DO
|
||||
INPUT "Enter size of matrix "; n
|
||||
LOOP UNTIL n > 0
|
||||
|
||||
DIM identity(1 TO n, 1 TO n)
|
||||
|
||||
CALL inicio(identity())
|
||||
CALL mostrar(identity())
|
||||
Loading…
Add table
Add a link
Reference in a new issue