object HelloWorld { def stvorec(n : Int): Int ={ if(n == 1) 1 else stvorec(n-1)+n+n-1 } def main(args: Array[String]) { println(stvorec(5)) } }
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more