From 15131f08fe51b84ff5a97a63a24be9d6c04dc4ba Mon Sep 17 00:00:00 2001 From: AdhilUsman <67159195+AdhilUsman@users.noreply.github.com> Date: Mon, 19 Oct 2020 22:13:00 +0530 Subject: [PATCH] An algorithm to find fibonacci numbers until N --- .../naive_fibonacci.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Basic/Calculate Nth Fibonacci Number/naive_fibonacci.cpp diff --git a/Basic/Calculate Nth Fibonacci Number/naive_fibonacci.cpp b/Basic/Calculate Nth Fibonacci Number/naive_fibonacci.cpp new file mode 100644 index 0000000..59e8b6b --- /dev/null +++ b/Basic/Calculate Nth Fibonacci Number/naive_fibonacci.cpp @@ -0,0 +1,20 @@ +#include +using namespace std; +int main() { + + int n1=0,n2=1,n3,i,number; + + cout<<"Enter the number of elements: "; + + cin>>number; + + cout<