var x: array [1..100000000] of string;
y: string; stop:boolean;
i, g:integer;
label f;
begin
stop := false;
i := 1;
while stop = false do begin
Readln(y);
if y = 'STOP' then begin stop := true; goto f; end;
x[i] := y;
i := i + 1;
f:
end;
for g := 1 to i - 1 do if Length(x[g]) > 5 then Writeln('> 5: ', x[g]);
end.
Объяснение:
var x: array [1..100000000] of string;
y: string; stop:boolean;
i, g:integer;
label f;
begin
stop := false;
i := 1;
while stop = false do begin
Readln(y);
if y = 'STOP' then begin stop := true; goto f; end;
x[i] := y;
i := i + 1;
f:
end;
for g := 1 to i - 1 do if Length(x[g]) > 5 then Writeln('> 5: ', x[g]);
end.
Объяснение: