2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
15
Task/Identity-matrix/VBScript/identity-matrix-2.vb
Normal file
15
Task/Identity-matrix/VBScript/identity-matrix-2.vb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
n = 8
|
||||
|
||||
arr = Identity(n)
|
||||
|
||||
for i = 0 to n-1
|
||||
for j = 0 to n-1
|
||||
wscript.stdout.Write arr(i,j) & " "
|
||||
next
|
||||
wscript.stdout.writeline
|
||||
next
|
||||
|
||||
Function Identity (size)
|
||||
Execute Replace("dim a(#,#):for i=0 to #:for j=0 to #:a(i,j)=0:next:a(i,i)=1:next","#",size-1)
|
||||
Identity = a
|
||||
End Function
|
||||
Loading…
Add table
Add a link
Reference in a new issue