Mercurial > hg > Members > kono > os9 > sbc09
view basic/exampl.bas @ 96:6ff8754c9749
fix for sbc09 os9 level1
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 26 Dec 2018 07:57:02 +0900 |
parents | 2088fd998865 |
children |
line wrap: on
line source
10 REM SYRACUSE SEQUENCES. 20 PRINT "ENTER A POSITIVE NUMBER"; 30 INPUT K 40 IF K>0 GOTO 70 50 PRINT "ERROR" 60 GOTO 20 70 N=0 80 PRINT K, 90 IF K=1 GOTO 160 100 IF K<>2*(K/2) GOTO 130 110 K=K/2 120 GOTO 140 130 K=3*K+1 140 N=N+1 150 GOTO 80 160 PRINT 170 PRINT "CONVERGED TO 1 IN ";N;" STEPS." 180 END