LINE INPUT a$
DIM b$(100)
k = 1
FOR i = 1 TO LEN(a$) - 1
c$ = MID$(a$, i, 1)
IF c$ = " " OR c$ = "," OR c$ = "." OR c$ = ";" OR c$ = ":" THEN k = k + 1 ELSE b$(k) = b$(k) + c$
NEXT
FOR i = k TO 1 STEP -1
PRINT b$(i); " ";
NEXT
Тестирование выполнено в программе QB64 ( Скачать )