Ordered words: Difference between revisions
→{{header|ALGOL 68}}
imported>Rowsety Moid |
|||
Line 325:
glossy
knotty</pre>
=={{header|Amazing Hopper}}==
<syntaxhighlight lang="c">
#include <basico.h>
#define MAX_LINE 30
algoritmo
fd=0
word={}, result={}
old_word="",new_word=""
token.separador'""'
abrir para leer("basica/unixdict.txt",fd)
iterar mientras ' no es fin de archivo (fd) '
usando 'MAX_LINE', leer línea desde(fd),
---copiar en 'old_word'---, separar para 'word '
word, ---retener--- ordenar esto,
encadenar en 'new_word'
cuando ( #(old_word == new_word) ){
new_word, meter en 'result'
}
reiterar
cerrar archivo(fd)
result ---retener---, obtener largo ---retener---
obtener máximo valor, es mayor o igual?, replicar esto
compactar esto
fijar separador 'NL', luego imprime todo
terminar
</syntaxhighlight>
{{out}}
<pre>
abbott
accent
accept
access
accost
almost
bellow
billow
biopsy
chilly
choosy
choppy
effort
floppy
glossy
knotty
</pre>
=={{header|APL}}==
|