Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def pascal(c: Int, r: Int): Int = {
- if (c == r || c == 0 || r == 0) 1
- else pascal(c-1,r-1)+pascal(c,r-1)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement