Program egor_sasha; var num_eg, num_sash,pri,pri1: real; var mes_eg,mes_sash: real; beginwriteln('numer egora'); readln(num_eg); writeln('numer sashi'); readln(num_sash); writeln('mesto egora (verkh=1,vniz=0)'); readln(mes_eg); writeln('mesto sashi (verkh=1,vniz=0)'); readln(mes_sash); pri: =num_sash+1; pri1: =num_eg+1; if num_eg=pri then writeln('yes') else writeln('no'); if num_sash=pri1 then writeln('yes') else writeln('no'); if mes_eg=1 then writeln('egor-high')else writeln('egor-low'); if mes_sash=1 then writeln('sasha-high')else writeln('sasha-low'); end.
const nx = 20; var x: array[1..nx, 1..nx] of integer;z:array[1..nx*2] of integer; i, j, k,n,r,t: integer; begin Writeln('Введите размер матрицы n');Read(n); for i := 1 to n do begin for j := 1 to n do begin Read(k);x[i, j] := k; end;end; Writeln('Исходный массив'); for i := 1 to n do begin for j := 1 to n do begin Write(x[i, j]:4); if x[i, j]>0 then begin t:=t+1; z[t]:=x[i, j];end; end; Writeln; end; Writeln;Writeln('Одномерный массив'); for j := 1 to t do Write(z[j]:4); end.
var x: array[1..nx, 1..nx] of integer;z:array[1..nx*2] of integer;
i, j, k,n,r,t: integer;
begin
Writeln('Введите размер матрицы n');Read(n);
for i := 1 to n do begin
for j := 1 to n do begin
Read(k);x[i, j] := k; end;end;
Writeln('Исходный массив');
for i := 1 to n do begin
for j := 1 to n do begin
Write(x[i, j]:4);
if x[i, j]>0 then begin t:=t+1; z[t]:=x[i, j];end;
end;
Writeln; end;
Writeln;Writeln('Одномерный массив');
for j := 1 to t do
Write(z[j]:4);
end.