Isograms and heterograms: Difference between revisions
Content added Content deleted
(→{{header|ALGOL 68}}: small tweaks to code and formatting) |
|||
Line 53:
# file opened OK #
BOOL at eof := FALSE;
# set the EOF handler for the file - notes eof has been reached and #
on logical file end( input
# in-place quick sort an array of strings #
Line 129 ⟶ 124:
[ 1 : 2 000 ]STRING words;
INT w count := 0;
WHILE
DO▼
STRING word;
get( input file, ( word, newline ) );
▲ DO
▲ # have another word #
# have another word #
IF order > 0
IF ( order = 1 AND w length
# a long heterogram or an isogram
# ordered as requierd
STRING s word
+ REPR ( max
FI
FI
Line 167 ⟶ 161:
print( ( newline, "heterograms longer than 10 characters" ) )
ELSE
print( ( newline, "isograms of order ", whole( order, 0 ) ) )
FI;
prev order := order;
|