Anonymous user
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 " +
"
(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
the number under 100,000 with the longest sequence is 77031 with a sequence length of 351
</pre>
|