From 7c4830da331874c46b7a6ed3bc30a31d6fb7444c Mon Sep 17 00:00:00 2001 From: patvgnw5f <483018233@qq.com> Date: Thu, 17 Feb 2022 17:23:59 +0800 Subject: [PATCH] =?UTF-8?q?Add=20=E6=96=90=E6=B3=A2=E9=82=A3=E5=A5=91?= =?UTF-8?q?=E6=95=B0=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 斐波那契数列 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 斐波那契数列 diff --git a/斐波那契数列 b/斐波那契数列 new file mode 100644 index 0000000..c9a3564 --- /dev/null +++ b/斐波那契数列 @@ -0,0 +1,11 @@ +nt fib(int n) +{ + if (n > 2) + { + return fib(n - 1) + fib(n - 2); + } + else + { + return 1; + } +} \ No newline at end of file