Решение на Pascal ABC.NET
var
s: string;
long, short: Integer;
words: array of string;
begin
Read(s);
words := s.Split(' ');
long := 0;
short := 99999;
for var i: Integer := 1 to length(words) - 1 do begin
if length(words[i]) > long then
long := length(words[i]);
if (length(words[i]) < short) and (length(words[i]) <> 0) then
short := length(words[i])
end;
WriteLn(short);
WriteLn(long)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Решение на Pascal ABC.NET
var
s: string;
long, short: Integer;
words: array of string;
begin
Read(s);
words := s.Split(' ');
long := 0;
short := 99999;
for var i: Integer := 1 to length(words) - 1 do begin
if length(words[i]) > long then
long := length(words[i]);
if (length(words[i]) < short) and (length(words[i]) <> 0) then
short := length(words[i])
end;
WriteLn(short);
WriteLn(long)
end.