CS 3304: Comparative Languages |
Implementing Subprograms |
[ Course Documents ] : [ Implementing Subprograms ] | ||||||||
|
program p; var v : int; function fac(n: int): int; begin if n <= 1 then fac := 1 else fac := n * fac(n--1); end; begin v := fac(3); print(v); end.