Hailstone sequence: Difference between revisions

m
→‎{{header|Pure}}: cleaned up white space
(added Pure)
m (→‎{{header|Pure}}: cleaned up white space)
Line 3,057:
printf
("the hailstone sequence for the number %d has %d elements " +
" starting with %s and ending with %s\n")
(n, l, __str__ (hs!!(0..3)), __str__ ( hs!!((l-4)..l)));
 
// 3. Show the number less than 100,000 which has the longest hailstone
// sequence together with that sequences length.
 
 
printf ("the number under 100,000 with the longest sequence is %d " +
"with a sequence length of %d\n")
Line 3,072 ⟶ 3,070:
Output:
<pre>
the hailstone sequence for the number 27 has 112 elements starting with [27,82,41,124] and ending with [8,4,2,1]
the number under 100,000 with the longest sequence is 77031 with a sequence length of 351
</pre>
Anonymous user