Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def zad2(r:Int):Int = {
- def help(r:Int, acc:Double, n:Double):Int =
- if (acc > r) n.toInt
- else help(r,acc + 1/n, n + 1)
- help(r, 1.0, 1.0)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement