Constn=10;m=10; var a:array[1..n,1..m]of integer; i,j,s:integer; begin for i:=1 to n do begin writeln; s:=0; for j:=1 to m do begin a[i,j]:=random(50); write(a[i,j]:4); if i mod 2<>0 then s:=s+a[i,j]; end; if i mod 2<>0 then writeln(s:6); end; end.
Const n=15; var a:array[1..n]of integer; i,i_max:integer; begin for i:=1 to n do begin a[i]:=random(4)+15; writeln(a[i]); end; writeln; for i:=1 to n do write(a[i]:4); writeln; i_max:=1; for i:=2 to n do if a[i]>a[i_max]then i_max:=i; for i:=1 to n do if a[i]mod 5=0 then a[i]:=a[i_max]; for i:=1 to n do write(a[i]:4); end.
var
a:array[1..n,1..m]of integer;
i,j,s:integer;
begin
for i:=1 to n do
begin
writeln; s:=0;
for j:=1 to m do
begin
a[i,j]:=random(50);
write(a[i,j]:4);
if i mod 2<>0 then
s:=s+a[i,j];
end;
if i mod 2<>0 then
writeln(s:6);
end;
end.
var
a:array[1..n]of integer;
i,i_max:integer;
begin
for i:=1 to n do
begin
a[i]:=random(4)+15;
writeln(a[i]);
end;
writeln;
for i:=1 to n do
write(a[i]:4);
writeln;
i_max:=1;
for i:=2 to n do
if a[i]>a[i_max]then
i_max:=i;
for i:=1 to n do
if a[i]mod 5=0 then
a[i]:=a[i_max];
for i:=1 to n do
write(a[i]:4);
end.