(PC-1211) Prime Factor Decomposition
|
03-23-2021, 06:16 PM
(This post was last modified: 03-23-2021 06:20 PM by C.Ret.)
Post: #3
|
|||
|
|||
RE: (PC-1211) Prime Factor Decomposition
Another strange line due to its useless affectation "A=A" is :
Code: 110: IF A>1LET A=A:K=K+1:A(26+K)=A:PAUSE A Which may be replace by a shorter code: Code: 110: IF A>1LET C=A:GOSUB 160 Memorizing all the factors is a good idea, the user just have to wait for the two 'bips' and all the factors are listed with no delay. Here is the version of I have used in the 80's when I was a child at middle school. Code: 1 F=F+D,P=0:IF FF>NPRINT N,"END ":END In DEF mode: Code: > 129211200 [shift][ N ] This is quite a shorter listing than the one propose by SlideRule, but the user have to wait for all factors to be displayed until the last one with the final '.END' Also, there is no 'beeps' since they were forbidden in class and during examinations. Also note the accelerating wheel (the D variable) which is alternatively +2 and +4 increments after factor 5. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(PC-1211) Prime Factor Decomposition - SlideRule - 03-21-2021, 03:46 PM
RE: (PC-1211) Prime Factor Decomposition - pyedog - 03-23-2021, 03:43 PM
RE: (PC-1211) Prime Factor Decomposition - C.Ret - 03-23-2021 06:16 PM
|
User(s) browsing this thread: 1 Guest(s)