RosettaCodeData/Task/Factorial/Comefrom0x10/factorial.comefrom0x10
2017-09-25 22:28:19 +02:00

15 lines
201 B
Text

n = 5 # calculates n!
acc = 1
factorial
comefrom
comefrom accumulate if n < 1
accumulate
comefrom factorial
acc = acc * n
comefrom factorial if n is 0
n = n - 1
acc # prints the result