gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
version string 1.0.0
[mjc2wsl.git] / samples / RekFac.mj
1 program RekFac{
3 int factorial(int f)
4 {
5 if (f<0)
6 return 0;
7 if (f<=1)
8 return 1;
9 return factorial(f-1) * f ;
10 }
12 void main()
13 {
14 print(factorial(3),3);
15 print(factorial(10),10);
16 }
17 }
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner