CLS
t$ = "Masha go to school"
t$ = " " + t$
DIM a$(100)
FOR i = 1 TO LEN(t$)
IF MID$(t$, i, 1) = " " THEN k = k + 1 ELSE a$(k) = a$(k) + MID$(t$, i, 1)
NEXT
max = LEN(a$(1))
n = 1
FOR i = 1 TO k
IF LEN(a$(i)) > max THEN max = LEN(a$(i)): n = i
NEXT
PRINT a$(n)
Тестирование выполнено в программе QB64 ( Скачать )