

{
PROGRAMMED BY   : MOHAMMAD ALJADA
DOWNLOADED FROM : WWW.GEOCITIES.COM/MOHJADA
PROGRAM         : Print Array
}

USES WINCRT;

VAR ARR:ARRAY[1..100,1..100] OF INTEGER;
    I,J,N,M:INTEGER;


BEGIN

     WRITE('INPUT NUMBER OF ROWS   :');
     READLN(N);
     WRITE('INPUT NUMBER OF COLUMS :');
     READLN(M);


     FOR I:=1 TO N DO
         FOR J:=1 TO M DO
         BEGIN
         WRITE('INPUT ITEM [',I,',',J,'] :');
         READLN(ARR[I,J]);
         END;


     FOR I:=1 TO N DO
     BEGIN

          FOR J:=1 TO M DO
          WRITE(ARR[I,J]:4);
       
     WRITELN;
     END;

     WRITELN;


     FOR J:=1 TO M DO
     BEGIN

          FOR I:=1 TO N DO
          WRITE(ARR[I,J]:4);
       
     WRITELN;
     END;

END.

      