Find words which contains more than 3 e vowels: Difference between revisions
Find words which contains more than 3 e vowels (view source)
Revision as of 19:47, 1 December 2021
, 2 years agoAdd CLU
(Added solution for Action!) |
Not a robot (talk | contribs) (Add CLU) |
||
Line 514:
{{out}}
<pre>belvedere
dereference
elsewhere
erlenmeyer
evergreen
everywhere
exegete
freewheel
nevertheless
persevere
preference
referee
seventeen
seventeenth
telemeter
tennessee</pre>
=={{header|CLU}}==
<lang clu>e_word = proc (s: string) returns (bool)
e: int := 0
for c: char in string$chars(s) do
if string$indexc(c, "aiou") ~= 0 then
return (false)
end
if c = 'e' then e := e + 1 end
end
return (e > 3)
end e_word
start_up = proc ()
po: stream := stream$primary_output()
dict: stream := stream$open(file_name$parse("unixdict.txt"), "read")
while true do
word: string := stream$getl(dict)
except when end_of_file: break end
if e_word(word) then stream$putl(po, word) end
end
stream$close(dict)
end start_up</lang>
{{out}}
<pre>belvedere
dereference
|