interface
const ms=5;ns=5;
type massiv=array[1..ms,1..ns] of real;
procedure input(var mas:massiv;m,n:byte);
procedure output(mas:massiv; m,n:byte);
function sum(mas:massiv; m,n:byte):real;
implementation
procedure input;
var i,j:byte;
begin
write('m=');
readln(m);
write('n=');
readln(n);
for i:=1 to m do
for j:=1 to n do
begin
write('mas[',i,',',j,']=');
readln(mas[i,j]);
end;
end;
procedure output;
var i,j:byte;
begin
for i:=1 to m do
begin
for j:=1 to n do
write(mas[i,j]:4);
writeln;
end;
end;
function sum;
var i,j:byte;
begin
sum:=0;
for i:=1 to m do
for j:=1 to n do
sum:=sum(mas,m,n)+mas[i,j];
end;
end.
извините, но теги что-то не работают...