Prime factors ---------------------------------------------------------------- Version: 1.0, 971216 Creators: Daniel Bergman, Mattias Morén, Peter Widmark. Description: Splits a number into its prime factors. Comments: "->" is the "STO>"-button, "\/" is the square root. Known bugs: None. Size: 90 bytes. For more games and programs, please visit http://ti80.burtrask.net. PROGRAM:PRIMF INPUT X IF X<=1:STOP LBL 1 2->A IF REMAINDER(X,2)=0:GOTO 2 FOR(A,3,\/X+1,2 IF REMAINDER(X,A)=0:GOTO 2 END IF X<>1:DISP X STOP LBL 2 DISP A X/A->X GOTO 1 -------------------------------------------------------------------- Copyright (C) 1998 by Daniel Bergman & Mattias Morén http://ti80.burtrask.net