Var a:array[1..10]of integer; i,n:integer; begin for i:=1 to 10 do begin a[i]:=random(10)+1; write(a[i],'; '); end; for i:=1 to 9 do if a[i]<a[10] then begin n:=i; break; end; writeln; write('ответ: '); if n>0 then writeln(a[n]) else writeln(n); end.
a:array[1..10]of integer;
i,n:integer;
begin
for i:=1 to 10 do
begin
a[i]:=random(10)+1;
write(a[i],'; ');
end;
for i:=1 to 9 do
if a[i]<a[10] then
begin
n:=i;
break;
end;
writeln;
write('ответ: ');
if n>0 then writeln(a[n]) else writeln(n);
end.