Prequel
primitive recursive driven programming


Factorial

Enter an integer number between 0 and 7.

Run Pause Stop
Runtime Error: DIVISION BY ZERO
0
0
0
← calls
← instructions
← memory (max use: 0)

Prequel program

Edit Save Load Debug
Parser Error: UNEXPECTED CHAR

Module: factorial

n = factorial.input
result = 1
repeat n
result *= n+1
endrep
factorial.return(result)

Input:

factorial.input
 The integer written in the editable text input.
 -> e.g. 5

Functions:

factorial.return(result)
 End computation and show the calculated value.
 -> result: calculated integer value