Program HOC24;
var s,st: string;
i,n,max: integer;
a: array[1..1000] of string;
begin
write('Nhap xau: '); readln(s);
s:=s+' ' n:=1;
while length(s)<>0 do
begin
n:=n+1;
a[n]:=copy(s,1,pos(' ',s));
delete(s,1,pos(' ',s));
end;
max:=length(a[1]);
for i:=2 to n do if max<length(a[i]) then
begin
max:=length(a[i]);
st:=a[i];
end;
write('Tu co do dai lon nhat trong xau la: ',st);
readln
end.
var s,st: string;
i,n,max: integer;
a: array[1..1000] of string;
begin
write('Nhap xau: '); readln(s);
s:=s+' ' n:=1;
while length(s)<>0 do
begin
n:=n+1;
a[n]:=copy(s,1,pos(' ',s));
delete(s,1,pos(' ',s));
end;
max:=length(a[1]);
for i:=2 to n do if max<length(a[i]) then
begin
max:=length(a[i]);
st:=a[i];
end;
write('Tu co do dai lon nhat trong xau la: ',st);
readln
end.