Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
25
Task/Identity-matrix/Delphi/identity-matrix.pas
Normal file
25
Task/Identity-matrix/Delphi/identity-matrix.pas
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
program IdentityMatrix;
|
||||
|
||||
// Modified from the Pascal version
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
|
||||
var
|
||||
matrix: array of array of integer;
|
||||
n, i, j: integer;
|
||||
|
||||
begin
|
||||
write('Size of matrix: ');
|
||||
readln(n);
|
||||
setlength(matrix, n, n);
|
||||
|
||||
for i := 0 to n - 1 do
|
||||
matrix[i,i] := 1;
|
||||
|
||||
for i := 0 to n - 1 do
|
||||
begin
|
||||
for j := 0 to n - 1 do
|
||||
write (matrix[i,j], ' ');
|
||||
writeln;
|
||||
end;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue