src/main/scala/main.scala aktualisiert

fixed small error in fac()
This commit is contained in:
Johannes Schmelz 2023-11-07 15:59:31 +00:00
parent f0ab9867bf
commit 46d75229c8

View File

@ -41,7 +41,7 @@ def searchNameByNumber(adressen:List[kontakt], searchedNumber:String):String = {
def binKoeff(m:Int, n:Int):Int = { def binKoeff(m:Int, n:Int):Int = {
def fac(a: Int): Int = { def fac(a: Int): Int = {
if (a == 1) return 1 if (a == 0) return 1
else a * fac(a - 1) else a * fac(a - 1)
} }