Нужен псевдокод к коду: (паскаль)
program z1;
var a:array [1..100,1..100] of integer;
b:array [1..100] of integer;
n,m,i,j,s:integer;
begin
write ('Введите количество строк (n<=100) ');
read (n);
write ('Введите количество столбцов (m<=100) ');
read (m);
writeln ('Массив А');
for i:= 1 to n do
begin
for j:=1 to m do
begin
a[i,j]:=Random(19)-9;
write(a[i,j]:4)
end;
writeln
end;
for j:= 1 to m do
begin
s:=0;
for i:=1 to n do if (a[i,j]>0) and (a[i,j] mod 2 = 0) then s:=s+a[i,j];
b[j]:=s
end;
writeln ('Массив B');
for j:= 1 to m do write (b[j]:4)
end.
Объяснение:
Var a,b:array [1..100,1..100] of real;
current_row,current_column,rows,columns:integer;
begin
readln(rows);
readln(columns);
for current_row := 1 to rows do begin
writeln();
for current_column := 1 to columns do begin
read(a[current_row,current_column]);
b[current_row,current_column] :=a [current_row,current_column] / 8;
end;
end;
for current_row := 1 to rows do begin
writeln();
for current_column := 1 to columns do
write(b[current_row,current_column]:4, ' ');
end;
end.