Uses crt; var a:array [1..25] of integer; i,t,j,max,s:integer; begin max:=-10; s:=0; t:=0; j:=0; for i:=1 to 25 do begin a[i]:=random(18)-10; if a[i]> max then begin max:=a[i]; j:=i; end; end; for i:=1 to 25 do begin t:=t+1; write(' a[',i:2,']=',a[i]:2); if t=5 then begin writeln; t:=0; end; end; j:=j+1; for i:=j to 25 do s:=s+a[i]; write(s); end.
var a:array [1..25] of integer; i,t,j,max,s:integer;
begin
max:=-10; s:=0; t:=0; j:=0;
for i:=1 to 25 do begin
a[i]:=random(18)-10;
if a[i]> max then begin
max:=a[i];
j:=i;
end;
end;
for i:=1 to 25 do begin
t:=t+1;
write(' a[',i:2,']=',a[i]:2);
if t=5 then begin
writeln;
t:=0;
end;
end;
j:=j+1;
for i:=j to 25 do
s:=s+a[i];
write(s);
end.