Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.15 KB | None | 0 0
  1. def zad2(r:Int):Int = {
  2.   def help(r:Int, acc:Double, n:Double):Int =
  3.     if (acc > r) n.toInt
  4.     else help(r,acc +  1/n, n + 1)
  5.   help(r, 1.0, 1.0)
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement