Display the matrix A (dimension NxN, enter numbers randomly) in the I quarter - 1, in the II quarter - 2, in the III quarter - 3, in the IV quarter - 4. N-even, for example:
111222 111222 111222 333444 333444 333444
Here is the code: program Project2;
{$APPTYPE CONSOLE} uses SysUtils; var i,j,k,n:integer; a:array[1..100] of array [1..100] of integer; begin write('please enter n: '); readln(n); writeln; k:=1; for j:=1 to n do begin for i:=1 to n do begin a[i,j]:=k; if (i mod 2)=0 then inc(k); if a[i,j]<10 then write(' '); write(a[i,j],' '); end; writeln; end; readln; end.