var a: array[1..100] of real; i, n: integer; min: real;
begin {ввод массива} if handsfree then n := random(20) + 5 else begin write('n = '); readln(n); end;
writeln('Данные массива:'); for i := 1 to n do begin if handsfree then begin a[i] := random(100); write(a[i], ' '); end else readln(a[i]); end; writeln();
{минимум и максимум} min := a[1]; for i := 1 to n do begin if (min > a[i]) and (i mod 2=1) then min := a[i]; end; writeln('min = ', min); end.
handsfree = true;
var
a: array[1..100] of real;
i, n: integer;
min: real;
begin
{ввод массива}
if handsfree then
n := random(20) + 5
else begin
write('n = ');
readln(n);
end;
writeln('Данные массива:');
for i := 1 to n do
begin
if handsfree then begin
a[i] := random(100);
write(a[i], ' ');
end
else readln(a[i]);
end;
writeln();
{минимум и максимум}
min := a[1];
for i := 1 to n do
begin
if (min > a[i]) and (i mod 2=1) then min := a[i];
end;
writeln('min = ', min);
end.