From f39b5c0f5034f9e89f79e8602c213657bf609cb4 Mon Sep 17 00:00:00 2001 From: HORVILLE Ewen Date: Fri, 7 Oct 2022 11:13:46 +0200 Subject: [PATCH] TP01 + TP02 Fibbo --- DEV 3.2/TP02/Fibonnaci/Fibbonaci.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 DEV 3.2/TP02/Fibonnaci/Fibbonaci.java diff --git a/DEV 3.2/TP02/Fibonnaci/Fibbonaci.java b/DEV 3.2/TP02/Fibonnaci/Fibbonaci.java new file mode 100644 index 0000000..bbb0ae4 --- /dev/null +++ b/DEV 3.2/TP02/Fibonnaci/Fibbonaci.java @@ -0,0 +1,16 @@ +public class Fibbonaci { + + public static int fibbo(int n, int r) { + switch (n) { + case 0: + return 0; + case 1: + return 1; + default: + return fibbo(n-2, r) + fibbo(n-1, r); + } + } + public static void main(String[] args) { + + } +}