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

14 lines
397 B
Rexx
Raw Permalink Normal View History

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