Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this function should be able to factorise any number
- int num
- func factorial(int n) return int {
- if num<1 {
- return 0
- }
- else {
- return num * factorial( n - 1 )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement