src$ = LCASE$("ZEROONETwOThReEFOUrFIVeSiXsEVENEIgHTNinE")
CLS
OPEN "\words\words.txt" FOR INPUT AS #1
DO
LINE INPUT #1, w$
s$ = src$
good = 1: p = 1
FOR i = 1 TO LEN(w$)
ix = INSTR(p, s$, MID$(w$, i, 1))
IF ix = 0 THEN good = 0: EXIT FOR
p = ix + 1
NEXT
IF good THEN
IF LEN(w$) > 8 THEN
max = LEN(w$)
PRINT w$, max
END IF
END IF
LOOP UNTIL EOF(1)
CLOSE
PRINT
OPEN "\words\words.txt" FOR INPUT AS #1
DO
LINE INPUT #1, w$
s$ = src$
good = 1
FOR i = 1 TO LEN(w$)
ix = INSTR(s$, MID$(w$, i, 1))
IF ix = 0 THEN good = 0: EXIT FOR
s$ = LEFT$(s$, ix - 1) + MID$(s$, ix + 1)
NEXT
IF good THEN
IF LEN(w$) > 13 THEN
max = LEN(w$)
PRINT w$, max
END IF
END IF
LOOP UNTIL EOF(1)
CLOSE
Part a words of at least 9 letters:
enthusing 9
foresight 9
rehousing 9
rethought 9
retrousse 9
rewrought 9
theorising 10
threonine 9
Part c (words of at least 14 letters):
ethnohistories 14
foreshortening 14
forthrightness 14
heterogeneities 15
interventionist 15
interventionists 16
nonforfeitures 14
nonnitrogenous 14
nonuniversities 15
noteworthiness 14
overextensions 14
overgenerosities 16
overingenuities 15
overintensities 15
overnourishing 14
overnutritions 14
oversweetening 14
reinterviewing 14
ungenerosities 14
|
Posted by Charlie
on 2014-04-13 13:02:11 |