Start with a positive integer n. If n is even, divide it by 2; if odd, replace it by 3n + 1. Repeat until n = 1 (mathematicians believe this always happens, but nobody has proved it).
Write Collatz: read n (use long) and print the first 15 steps of the sequence (then ... if there are more), the number of steps and the highest value reached:
Sequence: 6 3 10 5 16 8 4 2 1
Steps: 8
Highest value: 16
For n < 1 print Enter a positive number.