Program maxim; const n=15 {15 студентов}; var a:array[1..n] of integer; i,max:integer; begin randomize; for i:=1 to n do begin a[i]:=random(10){кол-во до 15}; write (a[i],' '); end; max:=a[1]; for i:=2 to n do begin if a[i]>max then max:=a[i]; end; writeln; writeln (max); end.
const n=15 {15 студентов};
var a:array[1..n] of integer;
i,max:integer;
begin
randomize;
for i:=1 to n do begin
a[i]:=random(10){кол-во до 15};
write (a[i],' ');
end;
max:=a[1];
for i:=2 to n do begin
if a[i]>max then max:=a[i];
end;
writeln;
writeln (max);
end.