PROG COLLATZ  
BARC 3
SCORE=0
"ENTER YOUR NUMBER TO COLLATZ BOUNCE"
NUM=I=KEYB
TOP=I
WHILE I NE 1
DO      
   IF I MOD 2 EQ 0
   THEN I=I÷2   
      BARH -30
   ELSE I=1+3×I
      BARH 30
   ENDI 
   SCORE=SCORE+1
   I
   IF I GT TOP
   THEN TOP=I
   ENDI
ENDW
BARH 0
"NUM TOP SCORE"
NUM,TOP,SCORE
SCORE
ENDP