RosettaCodeData/Task/Flow-control-structures/REXX/flow-control-structures-4.rexx
2014-01-17 05:34:36 +00:00

12 lines
387 B
Rexx

numeric digits 1000 /*prepare for some gihugeic numbers.*/
...
n=4
say n'!=' factorial(n)
exit
/*──────────────────────────────────FACTORIAL subroutine────────────────*/
factorial: parse arg x
!=1
do j=2 to x
!=!*j
end /*j*/
return !