06-26-2003, 09:06 PM
Quote:HEY! NO FAIR!
IT's THREE LINES OF CODE!
Technically, you're right, but Antoni's approach still merits recognition within the constraints of this challange.
Your approach also deserves merit for its simplicity, even though it needs the extra GOTO instruction to work.
I recommend making it a little shorter as follows:
Code:
REM 1 IF fact& = 2 THEN fact2& = fact2& * 2 ELSE fact2& = fact2& * fact&: fact& = fact& - 1: GOTO 1
1 IF fact& > 1 THEN fact2& = fact2& * fact&: fact& = fact& - 1: GOTO 1