Advertisement
Guest User

Untitled

a guest
Mar 11th, 2015
528
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  def nthFibonacci(n : Int):Int = {
  2.     if (n == 1 || n == 2) n
  3.     else nthFibonacci(n-1) + nthFibonacci(n-2)
  4.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement