INCREASE N INCREASE N INCREASE N # constant, N=3 INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE M INCREASE F # flag, F=1 while we need to continue REPEAT M TIMES ( # subtract 1 from X, result in Z REPEAT X TIMES ( CLEAR Z REPEAT Y TIMES ( INCREASE Z ) INCREASE Y ) # if X=1, F=0, so no more action CLEAR F REPEAT Z TIMES ( CLEAR F INCREASE F ) )