# Set I, the number of iterations, to 196 INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W INCREASE W REPEAT W TIMES ( REPEAT W TIMES ( INCREASE I # Increase to 14^2 = 196 ) ) # Set M to 3 INCREASE M INCREASE M INCREASE M # Set P REPEAT X TIMES ( REPEAT N TIMES ( CLEAR P INCREASE P ) CLEAR N INCREASE N ) CLEAR N PRINT X REPEAT I TIMES ( REPEAT P TIMES ( # Z = X/2 | E = 1 (if X % 2 = 0) INCREASE E REPEAT X TIMES ( REPEAT E TIMES ( CLEAR E CLEAR T ) REPEAT T TIMES ( CLEAR T INCREASE E INCREASE Z ) INCREASE T ) INCREASE O # Is odd # If X is even REPEAT E TIMES ( CLEAR X CLEAR P REPEAT Z TIMES ( INCREASE X REPEAT N TIMES ( CLEAR P INCREASE P ) CLEAR N INCREASE N ) CLEAR N CLEAR O ) # If X is odd REPEAT O TIMES ( # Print result of 3x+1 REPEAT X TIMES ( REPEAT M TIMES ( INCREASE J ) ) INCREASE J PRINT J # Print the result of (3x+1)/2 REPEAT Z TIMES ( INCREASE X REPEAT N TIMES ( CLEAR P INCREASE P ) CLEAR N INCREASE N ) INCREASE X ) CLEAR Z CLEAR J CLEAR E CLEAR O PRINT X ) )