summaryrefslogtreecommitdiff
path: root/Ganlib/data/badluk_proc/xfact.c2m
blob: 0b681711a457249b06e8420f820cfd35cd3ef182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
*
* Calling the recursive "fact" procedure:
*
*  input  to  "fact": *n*
* output from "fact": *n_fact*
*
*    use to compute n!
*
 PROCEDURE fact      ;
 INTEGER   n := 8    ;
 INTEGER   n_fact    ;
 fact ::    <<n>> >>n_fact<< ;
 ECHO "FACTORIAL:" n $Bang_S "=" + n_fact ;
 QUIT " Program *xfact* XREF " .