RosettaCodeData/Task/Flow-control-structures/REXX/flow-control-structures-4.rexx

13 lines
387 B
Rexx
Raw Permalink Normal View History

2014-01-17 05:32:22 +00:00
numeric digits 1000 /*prepare for some gihugeic numbers.*/
2013-10-27 22:24:23 +00:00
...
2014-01-17 05:32:22 +00:00
n=4
say n'!=' factorial(n)
exit
/*──────────────────────────────────FACTORIAL subroutine────────────────*/
factorial: parse arg x
!=1
do j=2 to x
!=!*j
end /*j*/
return !