"Onion" and "salsa" possess a similar structure:
both words consist of two identical
2-letter syllables and a distinct letter between them.
Apparently, there are more English words of similar form (12312).
Find as many as you can.
OPEN "\words\words5.txt" FOR BINARY AS #1
w$ = SPACE$(5)
DO
GET #1, , w$
IF EOF(1) THEN EXIT DO
IF MID$(w$, 1, 1) = MID$(w$, 4, 1) THEN
IF MID$(w$, 2, 1) = MID$(w$, 5, 1) THEN
IF MID$(w$, 1, 1) <> MID$(w$, 2, 1) THEN
IF MID$(w$, 1, 1) <> MID$(w$, 3, 1) THEN
IF MID$(w$, 2, 1) <> MID$(w$, 3, 1) THEN
PRINT w$
END IF
END IF
END IF
END IF
END IF
LOOP
finds
algal
caeca
edged
ictic
magma
onion
pampa
salsa
seise
sense
shush
verve
zanza
|
Posted by Charlie
on 2010-06-30 13:23:52 |