Prime words: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: changed wording for the output text.) |
(Add Plain English) |
||
Line 501: | Line 501: | ||
<pre> |
<pre> |
||
36 prime words found: a, aaa, age, ..., meek, meg, q |
36 prime words found: a, aaa, age, ..., meek, meg, q |
||
</pre> |
|||
=={{header|Plain English}}== |
|||
<lang plainenglish>To run: |
|||
Start up. |
|||
Put "c:\unixdict.txt" into a path. |
|||
Read the path into a buffer. |
|||
Slap a rider on the buffer. |
|||
Loop. |
|||
Move the rider (text file rules). |
|||
Subtract 1 from the rider's token's last. \newline |
|||
Put the rider's token into a word string. |
|||
If the word is blank, break. |
|||
If the word is composed of prime letters, write the word on the console. |
|||
Repeat. |
|||
Wait for the escape key. |
|||
Shut down. |
|||
To decide if a byte is prime: |
|||
If the byte is in "aegkmq", say yes. |
|||
Say no. |
|||
To decide if a string is composed of prime letters: |
|||
Slap a substring on the string. |
|||
Loop. |
|||
If the substring is blank, say yes. |
|||
If the substring's first's target is not prime, say no. |
|||
Add 1 to the substring's first. |
|||
Repeat.</lang> |
|||
{{out}} |
|||
<pre style="height:18em"> |
|||
a |
|||
aaa |
|||
age |
|||
agee |
|||
ak |
|||
am |
|||
ama |
|||
e |
|||
egg |
|||
eke |
|||
em |
|||
emma |
|||
g |
|||
ga |
|||
gag |
|||
gage |
|||
gam |
|||
game |
|||
gamma |
|||
ge |
|||
gee |
|||
gem |
|||
gemma |
|||
gm |
|||
k |
|||
keg |
|||
m |
|||
ma |
|||
mae |
|||
magma |
|||
make |
|||
mamma |
|||
me |
|||
meek |
|||
meg |
|||
q |
|||
</pre> |
</pre> |
||