Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FUNCTION faculty(zahl IS INTEGER) IS INTEGER
- # Zahl ist nur für 32 bit integer
- WITH zahl >= 0, zahl <= 12
- # Rückgabewert ist immer größer 0
- WITH $ > 0
- IMPLEMENTATION IS
- IF zahl <= 1 THEN
- # Die Fakultät von 0 und 1 ist als 1 definiert.
- return 1;
- ELSE
- return faculty(zahl - 1) * zahl;
- END
- END
Advertisement
Add Comment
Please, Sign In to add comment