From 455841314c484856f51e2d871daeb8f59bebed6c Mon Sep 17 00:00:00 2001 From: amineelhajami Date: Wed, 26 Nov 2025 14:34:30 +0100 Subject: [PATCH] neu ding --- script.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/script.js b/script.js index e69de29..3f33271 100644 --- a/script.js +++ b/script.js @@ -0,0 +1,19 @@ + + +const monate = 10; + +function fibonacci(n) { + let folge = [1, 1]; + for (let i = 2; i < n; i++) { + folge[i] = folge[i - 1] + folge[i - 2]; + } + return folge; +} + +const hasenPaare = fibonacci(monate); + + +console.log("Hasen-Paare pro Monat:"); +hasenPaare.forEach((paare, index) => { + console.log(`Monat ${index + 1}: ${paare} Paar(e)`); +});