Find words which contains all the vowels: Difference between revisions
Content added Content deleted
(Added XPL0 example.) |
(Add Red) |
||
Line 1,473: | Line 1,473: | ||
malnourished mensuration oneupmanship pandemonium permutation |
malnourished mensuration oneupmanship pandemonium permutation |
||
perturbation portraiture praseodymium stupefaction sulfonamide </pre> |
perturbation portraiture praseodymium stupefaction sulfonamide </pre> |
||
=={{header|Red}}== |
|||
<lang rebol>Red[] |
|||
vowels: charset "aeiou" |
|||
count-vowels: function [ |
|||
"Returns the number of vowels in a string" |
|||
word [string!] |
|||
][ |
|||
result: 0 |
|||
foreach letter word [ |
|||
if find vowels letter [result: result + 1] |
|||
] |
|||
result |
|||
] |
|||
foreach word read/lines %unixdict.txt [ |
|||
if all [ |
|||
10 < length? word |
|||
5 = length? intersect word "aeiou" |
|||
5 = count-vowels word |
|||
][ |
|||
print word |
|||
] |
|||
]</lang> |
|||
{{out}} |
|||
<pre> |
|||
ambidextrous |
|||
bimolecular |
|||
cauliflower |
|||
communicable |
|||
communicate |
|||
consanguine |
|||
consultative |
|||
countervail |
|||
exclusionary |
|||
grandiloquent |
|||
importunate |
|||
incommutable |
|||
incomputable |
|||
insupportable |
|||
loudspeaking |
|||
malnourished |
|||
mensuration |
|||
oneupmanship |
|||
pandemonium |
|||
permutation |
|||
perturbation |
|||
portraiture |
|||
praseodymium |
|||
stupefaction |
|||
sulfonamide |
|||
</pre> |
|||
=={{header|REXX}}== |
=={{header|REXX}}== |