Code: Select all
Lbl 2
ClrHome
Prompt X
Lbl 1
For (Y,2, sqrt X)
If x/y=int(x/y)
Then
Disp Y
X/Y -> X
Goto 1
End
End
Disp X, "Done"
Pause
Menu("Again?","Yes",2,"No", 3)
Lbl 3
Stop
Moderators: phlip, Moderators General, Prelates
Code: Select all
Lbl 2
ClrHome
Prompt X
Lbl 1
For (Y,2, sqrt X)
If x/y=int(x/y)
Then
Disp Y
X/Y -> X
Goto 1
End
End
Disp X, "Done"
Pause
Menu("Again?","Yes",2,"No", 3)
Lbl 3
Stop
kriel wrote:Spoiler:
Berengal wrote:Only if they're killer robots. Legos are happy robots. Besides, even if they were killer robots it wouldn't stop me. You can't stop science and all that.
Code: Select all
:Input "INTEGERS ONLY!",X
:While X≠1
:2->N
:While int(X/N)≠X/N
:N+1->N
:End
:Disp N
:X/N->X
:End
Code: Select all
:Prompt X
:int(ln(x)/ln(16))->N
:While N=>0
:int(X/16^N)->A
:prgmABCDEF //a convoluted piece of code that makes the program display A through F rather than 10 through 15, this line is essentially Disp A
:X-A16^N->X
:N-1->N
:End
Code: Select all
Prompt X
While fpart(X/2)=0
Disp 2
X/2 -> X
End
3 -> Y
While Y*Y < X
While fpart(X/Y)=0
Disp Y
X/Y -> X
End
End
If X =/= 1
Then
Disp Y
End
Users browsing this forum: Exabot [Bot] and 25 guests