I will periodically post coding challenges to be solved with LiveCode.
Solving problems is a great way to improve your coding skills.
Vote for the best answer.
please paste plain text only.
please add [code] at the beginning of your code, and [/code] at the end to facilitate syntax colorizing.
if you see that ‘AndyP edited….’ your answer, this will be only for formatting.. I will not be changing your answer.
here my solution 🙂
put “accent, adders, biopsy, chitty, floors” into tElenco //the words
put true into tDouble //Put true if you want a double letter in a word
put empty into tRisultato
repeat for each item tLinea in tElenco
put 0 into tConta
repeat for each char tCarattere in tLinea
if tConta > 0 then
if tDouble = true then
if chartonum(tCarattere) < chartonum(tOldCarattere) then
if chartonum(tCarattere) <= chartonum(tOldCarattere) then
put tCarattere into tOldCarattere
add 1 to tConta
if tConta = len(tLinea) then put tLinea & cr after tRisultato
answer tRisultato as sheet