From 46d75229c862a82220003be43c51cf6133501272 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Tue, 7 Nov 2023 15:59:31 +0000 Subject: [PATCH] src/main/scala/main.scala aktualisiert fixed small error in fac() --- src/main/scala/main.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/main.scala b/src/main/scala/main.scala index 70ef690..2b98572 100644 --- a/src/main/scala/main.scala +++ b/src/main/scala/main.scala @@ -41,7 +41,7 @@ def searchNameByNumber(adressen:List[kontakt], searchedNumber:String):String = { def binKoeff(m:Int, n:Int):Int = { def fac(a: Int): Int = { - if (a == 1) return 1 + if (a == 0) return 1 else a * fac(a - 1) }