INCREASE B INCREASE B INCREASE B INCREASE B REPEAT B TIMES( REPEAT B TIMES( REPEAT B TIMES( REPEAT B TIMES( INCREASE I ) ) ) ) REPEAT I TIMES ( # I = 256 # IF X != 1 CLEAR C CLEAR F CLEAR Q REPEAT X TIMES ( REPEAT F TIMES ( CLEAR Q INCREASE Q CLEAR F ) INCREASE F ) REPEAT Q TIMES ( # Q is Basically an if x != 1 INCREASE O REPEAT X TIMES ( CLEAR E INCREASE E REPEAT O TIMES ( CLEAR O CLEAR E ) REPEAT E TIMES ( INCREASE O ) ) # after this, O is the remainder of X%2 CLEAR E INCREASE E # else block REPEAT O TIMES ( # IF X % 2 == 0 # DIVIDE BY 2 INCREASE O REPEAT X TIMES ( CLEAR E INCREASE E REPEAT O TIMES ( CLEAR O CLEAR E ) REPEAT E TIMES ( INCREASE O INCREASE R # R is the result of x/2 ) ) # set X = R CLEAR X REPEAT R TIMES ( INCREASE X ) ) REPEAT E TIMES ( # set X = 3X + 1 REPEAT X TIMES ( INCREASE X INCREASE X ) INCREASE X ) PRINT X ) )