Napisz program w Turbo Pascalu, który wydrukuje wartość elementów macierzy w podanej kolejności.
-------------->
<---------------
--------------->
<---------------
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
Type Macierz = Array of Array of Integer;
Procedure Wyswietl(M: Macierz);
Var I, A: Integer;
Begin
For I := Low(M) To High(M) Do
Begin
if (I and 1 = 0) Then
Begin
For A := Low(M[I]) To High(M[I]) Do
Write(M[I][A],' ');
End Else
For A := High(M[I]) Downto Low(M[I]) Do
Write(M[I][A],' ');
Writeln;
End;
End;
Var M: Macierz;
Begin
SetLength(M, 3, 3);
M[0][0] := 0;
M[0][1] := 1;
M[0][2] := 2;
M[1][0] := 0;
M[1][1] := 1;
M[1][2] := 2;
M[2][0] := 0;
M[2][1] := 1;
M[2][2] := 2;
Wyswietl(M);
End.
Link do kodu z komentarzami:
http://pastebin.com/n5JSkdUp