From 1c4a388d7088371552375f5796b4f92028c77645 Mon Sep 17 00:00:00 2001 From: SharmaRithik Date: Tue, 30 Oct 2018 19:13:43 +0530 Subject: [PATCH] printing nth fibonacci series --- fibonacci.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 fibonacci.cpp diff --git a/fibonacci.cpp b/fibonacci.cpp new file mode 100644 index 0000000..edd406e --- /dev/null +++ b/fibonacci.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; +int func(int n){ +long double f=0; +long double s=1; + cout<2){ + long double t; + for(int i=3;i<=n;i++){ + t=f+s; + cout<<" "<>x; + func(x); + return 0; +}