Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
20
Task/Semordnilap/Phix/semordnilap.phix
Normal file
20
Task/Semordnilap/Phix/semordnilap.phix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
sequence words={}, semilordnaps={}
|
||||
object word
|
||||
constant fn = open("demo\\unixdict.txt","r")
|
||||
|
||||
while 1 do
|
||||
word = trim(gets(fn))
|
||||
if atom(word) then exit end if
|
||||
if find(reverse(word),words) then
|
||||
semilordnaps = append(semilordnaps,word)
|
||||
end if
|
||||
words = append(words,word)
|
||||
end while
|
||||
|
||||
close(fn)
|
||||
|
||||
?length(semilordnaps)
|
||||
for i=1 to 5 do
|
||||
word = semilordnaps[i]
|
||||
printf(1,"%s - %s\n",{word,reverse(word)})
|
||||
end for
|
||||
Loading…
Add table
Add a link
Reference in a new issue