Factorial on TI

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

1 answer

  1. luckydu43 Posted messages 4497 Registration date   Status Member Last intervention   1 177
     
    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
    1. thibautB Posted messages 148 Status Member 1
       
      Thank you, you helped me a little ^^ but what is the representation of your loop on TI? ^^
      0
    2. luckydu43 Posted messages 4497 Registration date   Status Member Last intervention   1 177
       
      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
    3. thibautB Posted messages 148 Status Member 1
       
      Thank you! ^^
      0