INPUT "vvedite stroku ", a$
a$ = " " + a$
FOR i = 1 TO LEN(a$)
IF MID$(a$, i, 1) = " " THEN k = k + 1 ELSE b$(k) = b$(k) + MID$(a$, i, 1)
NEXT
max = LEN(b$(1))
min = LEN(b$(1))
FOR i = 1 TO k
IF LEN(b$(i)) > max THEN max = LEN(b$(i)): smax$ = b$(i)
IF LEN(b$(i)) < min THEN min = LEN(b$(i)): smin$ = b$(i)
NEXT
PRINT "max dlina="; max; " max slovo="; smax$
PRINT "min dlina="; min; " min slovo="; smin$
Тестирование выполнено в программе QB64 ( Скачать )