From 8039d9b249b39ec1993cd576caa42a2ec7bf0e04 Mon Sep 17 00:00:00 2001 From: Justin Trausch Date: Tue, 6 Feb 2024 17:20:51 +0100 Subject: [PATCH] =?UTF-8?q?Basiertes=20Verbindlichkeit=20(weiter=20For=20s?= =?UTF-8?q?chleife=20hinzugef=C3=BCgt)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ProduktSumme.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ProduktSumme.c b/src/ProduktSumme.c index 21a1ca8..0d3db9e 100644 --- a/src/ProduktSumme.c +++ b/src/ProduktSumme.c @@ -8,5 +8,12 @@ int berechneProdukt(int start, int ende) { for (int i = start; i <= ende; i++) { produkt *= i; } + for (int j = start; j <= ende; j++) { + for (int k = start; k <= ende; k++) { + for (int g = k; g <= ende; g++){ + produkt *= j + k -g; + } + } + } return produkt; } \ No newline at end of file