This commit is contained in:
Ingy döt Net 2013-04-10 21:29:02 -07:00
parent 764da6cbbb
commit db842d013d
19005 changed files with 197040 additions and 7 deletions

View file

@ -0,0 +1,8 @@
form factorial using iv_val type i.
data: lv_res type i value 1.
do iv_val times.
multiply lv_res by sy-index.
enddo.
iv_val = lv_res.
endform.

View file

@ -0,0 +1,11 @@
form fac_rec using iv_val type i.
data: lv_temp type i.
if iv_val = 0.
iv_val = 1.
else.
lv_temp = iv_val - 1.
perform fac_rec using lv_temp.
multiply iv_val by lv_temp.
endif.
endform.