Exactly three adjacent 3 in lists: Difference between revisions

m
(Added Algol 68)
Line 12:
 
=={{header|ALGOL 68}}==
Including the extra test cases from the Raku and Wren samplesamples.
<lang algol68>BEGIN # test lists contain exactly 3 threes and that they are adjacent #
[]INT list1 = ( 9, 3, 3, 3, 2, 1, 7, 8, 5 ); # task test case #
Line 19:
[]INT list4 = ( 1, 2, 3, 4, 5, 6, 7, 8, 9 ); # " " " #
[]INT list5 = ( 4, 6, 8, 7, 2, 3, 3, 3, 1 ); # " " " #
[]INT list6 = ( 3, 3, 3, 1, 2, 4, 5, 1, 3 ); # additional test from the Raku/Wren sample #
[]INT list7 = ( 0, 3, 3, 3, 3, 7, 2, 2, 6 ); # additional test from the Raku/Wren sample #
[]INT list8 = ( 3, 3, 3, 3, 3, 4, 4, 4, 4 ); # additional test from the Raku/Wren sample #
[][]INT lists = ( list1, list2, list3, list4, list5, list6, list7, list8 );
FOR l pos FROM LWB lists TO UPB lists DO
3,048

edits