program minMax;
type Massiv=array[1..15]of integer;
var v:Massiv;
i, min, max:integer;
begin
randomize;
v[1]:=5+random(46);
min:=v[1]; max:=v[1];
for i:=2 to 15 do
v[i]:=5+random(46);
if v[i]<min then min:=v[i];
if v[i]>max then max:=v[i];
end;
writeln(' Massiv: ');
for i:=1 to 15 do
write(v[i], ' ');
writeln;
writeln('min = ',min);
writeln('max = ',max);
end.
program minMax;
type Massiv=array[1..15]of integer;
var v:Massiv;
i, min, max:integer;
begin
randomize;
v[1]:=5+random(46);
min:=v[1]; max:=v[1];
for i:=2 to 15 do
begin
v[i]:=5+random(46);
if v[i]<min then min:=v[i];
if v[i]>max then max:=v[i];
end;
writeln(' Massiv: ');
for i:=1 to 15 do
write(v[i], ' ');
writeln;
writeln('min = ',min);
writeln('max = ',max);
end.