Răspuns :
1)
var
a: array[1..101,1..101] of integer;
i,j,n,m,k: integer;
begin
read(m);
read(n);
read(k);
for i:=1 to m do
for j:=1 to n do
begin
read(a[i,j]);
a[i,j]:=a[i,j]+k;
end;
for i:=1 to m do
begin
for j:=1 to n do
write(a[i,j],' ');
writeln();
end;
end.
2)
var
a,b,c: array[1..101,1..101] of integer;
i,j,n,m: integer;
begin
read(m);
read(n);
for i:=1 to m do
for j:=1 to n do
read(a[i,j]);
for i:=1 to m do
for j:=1 to n do
read(b[i,j]);
for i:=1 to m do
for j:=1 to n do
c[i,j]:=a[i,j]+b[i,j];
for i:=1 to m do
begin
for j:=1 to n do
write(c[i,j],' ');
writeln();
end;
end.
3)
var
a: array[1..101,1..101] of integer;
i,j,n,m: integer;
begin
read(m);
read(n);
for i:=1 to m do
for j:=1 to n do
read(a[i,j]);
for i:=1 to n do
begin
for j:=1 to m do
write(a[j,i],' ');
writeln();
end;
end.
4)
var
a: array[1..101,1..101] of real;
i,j,n,m,k: integer;
s,p: real;
begin
s:=0;
p:=1;
k:=0;
read(m);
read(n);
for i:=1 to m do
for j:=1 to n do
begin
read(a[i,j]);
s:=s+a[i,j];
p:=p*a[i,j];
if a[i,j]-trunc(a[i,j])=0 then
k:=k+1;
end;
write(s,' ');
write(p,' ');
write(k,' ');
end.
5)
var
a: array[1..101,1..101] of integer;
i,j,n,m,max: integer;
begin
max:=-1;
read(m);
read(n);
for i:=1 to m do
for j:=1 to n do
begin
read(a[i,j]);
if a[i,j]>max then
max:=a[i,j];
end;
for i:=1 to m do
for j:=1 to n do
if a[i,j]=max then
begin
write(i,' ',j);
writeln();
end;
end.