Factorial on TI

Solved
thibautB Posted messages 148 Status Membre -  
thibautB Posted messages 148 Status Membre -
Hello,
I am looking for the algorithm of a factorial on TI.
Can someone help me?

1 réponse

luckydu43 Posted messages 4525 Registration date   Status Membre Last intervention   1 176
 
Hello!

I had fun making programs on graphing calculators... on Casio.
Please forgive the formality; I tried my best to adapt.

Here is the algorithm:


Program: Factoril
?->A /* input, or something else, anyway, put a number entered into A */
1->N /* Put the value 1 into the variable N
FOR 1->I, A /* Iterative loop where I increments, until reaching A */
I * N -> N /* We put in N the multiplication of I and N */
End /* End of the loop */

Output ("!",A," = ",N) /* Display !A = N, but with the right values ;-) This gives, for example: !5 = 120 */



Have a nice day!

The 3 biggest lies of a dev: 1. The doc? We'll do it later... 2. The program has been tested and has no bugs... 3. The technical specifications are coming...
0
thibautB Posted messages 148 Status Membre 1
 
Thank you, you helped me a little ^^ but what is the representation of your loop on TI? ^^
0
luckydu43 Posted messages 4525 Registration date   Status Membre Last intervention   1 176
 
The Ti-Planet site https://tiplanet.org/forum/portal.php#top allowed me to find an example. I provide you with the algorithm written COMPLETELY in TI!

Input "Factorial of: ",A
1 -> N
For(I,1,A)
I * N -> N
End
Disp "!",A," = ",N
End

Have a good evening!
0
thibautB Posted messages 148 Status Membre 1
 
Thank you! ^^
0