Find words which contains all the vowels: Difference between revisions

Add PL/I
(Add BASIC)
(Add PL/I)
Line 787:
25 words: ambidextrous bimolecular cauliflower ... praseodymium stupefaction sulfonamide
</pre>
 
=={{header|PL/I}}==
<lang pli>allTheVowels: procedure options(main);
countChar: procedure(str, ch) returns(fixed);
declare str char(32) varying, ch char, (i, n) fixed;
n = 0;
do i = 1 to length(str);
if substr(str, i, 1) = ch then n = n + 1;
end;
return(n);
end countChar;
 
declare dict file;
open file(dict) title('unixdict.txt');
on endfile(dict) stop;
declare word char(32) varying, (a, e, i, o, u) fixed;
do while('1'b);
get file(dict) list(word);
if length(word) > 10 then do;
a = countChar(word, 'a');
e = countChar(word, 'e');
i = countChar(word, 'i');
o = countChar(word, 'o');
u = countChar(word, 'u');
if a=1 & e=1 & i=1 & o=1 & u=1 then
put skip list(word);
end;
end;
end allTheVowels;</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|Python}}==
2,114

edits