Попробуй вот так, имей ввиду, практически не тестировал но работать должно, поправишь если что:
Код:
var mas : array[0..299] of integer;
i, j, kol, max : integer;
str, stroka : string;
begin
kol := StrToINT(Edit1.Text) - 1;
Randomize;
{заполняем массив случайными числами}
for i := 0 to kol do
begin
mas[i] := Random(100) + 1;
str := str + IntToStr(mas[i]) + ', ';
end;
Label2.Caption := str;
{обнуляем счетчики}
i := 0;
j := 0;
max := 0;
str := '';
stroka := '';
{Обработка массива mas}
while i<=kol do
begin
if kol = 1 then stroka := 'Последовательность не найдена' else
begin
if mas[i]<mas[i+1] then
begin
j := j + 1;
str := str + IntToStr(mas[i]);
end;
if (mas[i]>=mas[i+1]) and (j = 0) then str := '';
if (mas[i]>=mas[i+1]) and (j<>0) then
begin
str := str + IntToStr(mas[i]);
if j > max then
begin
max := j;
stroka := str;
end;
j:=0;
str := '';
end;
if (i = kol) and (j>max)
then begin
str:=str+ IntToStr(mas[i]);
stroka := str;
end;
if (i=kol) and (j=0) then stroka := 'не найдено';
i := i + 1;
end;
end;
Label1.Caption := stroka;
end;
end.