Jump to content

Find words which contains more than 3 e vowels: Difference between revisions

Add Draco
m (→‎{{header|R}}: Syntax highlighting.)
(Add Draco)
Line 700:
tennessee
</pre>
 
=={{header|Draco}}==
<lang draco>proc eword(*char line) bool:
word e;
char c;
bool ok;
ok := true;
e := 0;
while
c := line*;
line := line + 1;
ok and c ~= '\e'
do
if c='a' or c='i' or c='o' or c='u' then
ok := false
elif c='e' then
e := e + 1
fi
od;
ok and e>3
corp
 
proc nonrec main() void:
file(1024) dictfile;
[32] char buf;
*char line;
channel input text dict;
open(dict, dictfile, "unixdict.txt");
line := &buf[0];
while readln(dict; line) do
if eword(line) then writeln(line) fi
od;
close(dict)
corp</lang>
{{out}}
<pre>belvedere
dereference
elsewhere
erlenmeyer
evergreen
everywhere
exegete
freewheel
nevertheless
persevere
preference
referee
seventeen
seventeenth
telemeter
tennessee</pre>
 
=={{header|F_Sharp|F#}}==
2,119

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.