Guest User

Untitled

a guest
Feb 17th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. type mini_int is int[is >= 0, is <= 12];
  2.  
  3. factorial(zahl: mini_int): int[is > 0];
  4. begin
  5. if zahl <= 1:
  6. # Die Fakultät von 0 und 1 ist als 1 definiert.
  7. return 1;
  8. else:
  9. return factorial(zahl - 1) * zahl;
  10. end;
  11. end;
Advertisement
Add Comment
Please, Sign In to add comment