recursion 158 B

123456789101112
  1. int fac(int n) {
  2. if(n < 2) {
  3. return 1;
  4. }
  5. return n * fac(n - 1);
  6. }
  7. void main() {
  8. print fac(5);
  9. print fac(7);
  10. print fac(12);
  11. }