INCREASE Y INCREASE Y INCREASE Y INCREASE Y INCREASE Y #INCREASE X #INCREASE X #INCREASE X #INCREASE X #INCREASE X #INCREASE X #INCREASE X INCREASE B REPEAT Y TIMES ( REPEAT Y TIMES ( REPEAT Y TIMES ( INCREASE O ) ) ) REPEAT Y TIMES ( REPEAT Y TIMES ( INCREASE O ) ) REPEAT Y TIMES ( REPEAT Y TIMES ( INCREASE O ) ) PRINT X REPEAT O TIMES ( INCREASE Q CLEAR P CLEAR S REPEAT X TIMES ( REPEAT Q TIMES ( REPEAT P TIMES ( INCREASE S CLEAR Q ) ) INCREASE P ) REPEAT S TIMES ( CLEAR N CLEAR B CLEAR C CLEAR A REPEAT X TIMES ( INCREASE B REPEAT A TIMES ( CLEAR A CLEAR B ) REPEAT B TIMES ( INCREASE N INCREASE A ) ) CLEAR B INCREASE B REPEAT A TIMES ( CLEAR B ) REPEAT B TIMES ( CLEAR X REPEAT N TIMES ( INCREASE X ) PRINT X ) #3x+1 REPEAT A TIMES ( CLEAR Y REPEAT N TIMES ( INCREASE X ) REPEAT X TIMES ( INCREASE Y ) REPEAT X TIMES ( INCREASE Y ) PRINT Y PRINT X CLEAR N CLEAR B CLEAR C CLEAR A REPEAT X TIMES ( INCREASE B REPEAT A TIMES ( CLEAR A CLEAR B ) REPEAT B TIMES ( INCREASE N INCREASE A ) ) CLEAR B INCREASE B REPEAT A TIMES ( CLEAR B ) REPEAT B TIMES ( CLEAR X REPEAT N TIMES ( INCREASE X ) PRINT X ) #3x+1 REPEAT A TIMES ( CLEAR Y REPEAT N TIMES ( INCREASE X ) REPEAT X TIMES ( INCREASE Y ) REPEAT X TIMES ( INCREASE Y ) PRINT Y PRINT X ) ) ) )