2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
14
Task/Identity-matrix/Elena/identity-matrix.elena
Normal file
14
Task/Identity-matrix/Elena/identity-matrix.elena
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#import system.
|
||||
#import extensions.
|
||||
#import system'routines.
|
||||
#import system'collections.
|
||||
|
||||
#symbol program=
|
||||
[
|
||||
#var n := console write:"Enter the matrix size:" readLine toInt.
|
||||
|
||||
#var identity := n repeat &each: i = [ n repeat &each: j = [ (i == j)iif:1:0 ] summarize:(ArrayList new) ] summarize:(ArrayList new).
|
||||
|
||||
identity run &each:
|
||||
row = [ console writeLine:row ].
|
||||
].
|
||||
Loading…
Add table
Add a link
Reference in a new issue