September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,14 +1,14 @@
|
|||
#import system.
|
||||
#import extensions.
|
||||
#import system'routines.
|
||||
#import system'collections.
|
||||
import extensions.
|
||||
import system'routines.
|
||||
import system'collections.
|
||||
|
||||
#symbol program=
|
||||
program =
|
||||
[
|
||||
#var n := console write:"Enter the matrix size:" readLine toInt.
|
||||
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).
|
||||
var identity := 0 till:n repeat(:i)( 0 till:n repeat(:j)( (i == j)iif(1,0) ); summarize(ArrayList new) );
|
||||
summarize(ArrayList new).
|
||||
|
||||
identity run &each:
|
||||
row = [ console writeLine:row ].
|
||||
identity forEach
|
||||
(:row) [ console printLine:row ].
|
||||
].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue