Find words which contain the most consonants: Difference between revisions
Find words which contain the most consonants (view source)
Revision as of 10:18, 2 August 2022
, 1 year ago→{{header|ALGOL 68}}: tweak
(Added Algol 68) |
m (→{{header|ALGOL 68}}: tweak) |
||
Line 321:
# consonants, store it prefixed by the max abs char #
# complement of the number of consonants in it, so we #
# can sort the words into reverse consonant count order
words[ w count +:= 1 ] := REPR ( max abs char - consonants ) + word;
IF w length > max length THEN max length := w length FI
Line 348:
FI;
print( ( " ", " " * ( max length - w length ), word ) );
IF NOT ( need nl := ( p count +:= 1 ) MOD 5 /= 0 ) THEN
FI
OD
|