10 lines
131 B
Text
10 lines
131 B
Text
|
let n = 29;
|
||
|
while n != 1 {
|
||
|
println(n);
|
||
|
if n % 2 == 0 {
|
||
|
n = n/2;
|
||
|
} else {
|
||
|
n = 3*n+1;
|
||
|
}
|
||
|
}
|
||
|
println(n);
|