changeset 750 | e93a9e74ca8e |
parent 748 | 383f2a5952ce |
749:bb2335a5ca58 | 750:e93a9e74ca8e |
---|---|
15 |
15 |
16 if n % 2 == 0 |
16 if n % 2 == 0 |
17 then n := n / 2 |
17 then n := n / 2 |
18 else n := 3 * n+1; |
18 else n := 3 * n+1; |
19 |
19 |
20 cnt := cnt + 1; |
20 cnt := cnt + 1 |
21 }; |
21 }; |
22 |
22 |
23 write " => "; |
23 write " => "; |
24 write cnt; |
24 write cnt; |
25 write "\n"; |
25 write "\n"; |
26 bnd := bnd + 1; |
26 bnd := bnd + 1 |
27 }; |
27 } |