HTML & JS
#include<bits/stdc++.h> 
using namespace std; 

long long fibo(int n) 
{ 
	long long f[n+1];
	f[0] = 0; f[1] = 1;
	for(int i=2;i<=n;i++){
	    f[i] = f[i-2] + f[i-1];
	}
	return f[n];
} 
int main()
{ 
	int n; 
	cout<<"Enter n: ";
	cin>>n;
	cout<<"Fibonacci number is "<<fibo(n); 
	return 0; 
} 

Generated URL:

Output:

Enter n: Fibonacci number is 32951280099
Report Bug