Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type mini_int is int[is >= 0, is <= 12];
- factorial(zahl: mini_int): int[is > 0];
- begin
- if zahl <= 1:
- # Die Fakultät von 0 und 1 ist als 1 definiert.
- return 1;
- else:
- return factorial(zahl - 1) * zahl;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment