(12C Platinum) Factorial - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (12C Platinum) Factorial (/thread-12288.html) |
(12C Platinum) Factorial - Gamo - 01-28-2019 05:42 AM ALG mode solution program to calculate Factorial. This program is just the demonstration of the use of [LSTx] in ALG mode. HP-12C Platinum User's Guide explain how [LSTx] work in ALG mode. The displayed number is copied into the [LSTx] register when a new calculation commences. In general, [LSTx] in ALG mode is only useful in programs, where it can often be used instead of a numbered storage register, as it persists unchanged at least until digit entry or [LSTx] itself. ------------------------------------------------- Procedure: For n ≤ 69 n [R/S] display n! ------------------------------------------------ Program: ALG Mode Quote:1 [STO] 0 [X<>Y] // Set R0 for later Multiplication Remark: This demo program not include 0! = 1 and no negative integer allow. Gamo |