Программа на Паскале:
Program a1;
Var i, j : integer;
s : real;
a: array [1..5, 1..6] of real;
b: array [1..6] of real;
Begin
For i:=1 to 5 do
For j:=1 to 6 do
readln(a[i,j]);
s:=0;
For :=1 to 5 do
s:=s+a[i,j];
b[j]:=s
end;
Write ('Полученный массив В:');
For j:=1 to d do
write(b[j]);
readln
End.
Программа на Паскале:
Program a1;
Var i, j : integer;
s : real;
a: array [1..5, 1..6] of real;
b: array [1..6] of real;
Begin
For i:=1 to 5 do
For j:=1 to 6 do
readln(a[i,j]);
For j:=1 to 6 do
Begin
s:=0;
For :=1 to 5 do
s:=s+a[i,j];
b[j]:=s
end;
Write ('Полученный массив В:');
For j:=1 to d do
write(b[j]);
readln
End.