Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (14 sloc) 0.427 kB
* using a local variable instead of an item 01 in working-storage section
local n.
perform show-factorial using n varying n from 1 to 10.
show-factorial section using n.
local result.
perform factorial using n giving result.
display n "! = " result.
factorial section using n.
local m.
if n = 1 then return n.
subtract 1 from n giving m.
perform factorial using m giving m.
multiply n by m.
return m.
Jump to Line
Something went wrong with that request. Please try again.