CLS
REM
INPUT "vvedi 1 predlozenie: ", a$
currBeginPos = 0
currEndPos = 0
maxLen = 0
maxBeginPos = 0
maxEndPos = 0
FOR i = 1 TO LEN(a$)
IF MID$(a$, i, 1) = " " THEN
currEndPos = i
IF currEndPos - currBeginPos > maxLen THEN
maxBeginPos = currBeginPos + 1
maxEndPos = currEndPos - 1
maxLen = currEndPos - currBeginPos
END IF
currBeginPos = i - 1
ELSE
currEndPos = i + 1
END IF
NEXT i
tmpStr$ = LEFT$(a$,maxBeginPos)
FOR i=1 TO maxLen - 2
tmpStr$ = tmpStr$ + "*"
NEXT i
tmpStr$ = tmpStr$ + RIGHT$(a$, LEN(a$) - maxEndPos)
PRINT tmpStr$