Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fb_series
//g++ 5.4.0 #include <iostream> using namespace std; int fibonacci (int x) { int fib = 1; int y =1; int z=1; for (int i=2; i<x; i++) { y = z; z = fib; fib = y + z; } return fib; } int main() { int input = 5; //cin>>input; cout<<fibonacci(input)<<endl; }
run
|
edit
|
history
|
help
0
member function pointer
HashMap
euler tour (by pure theory)
Random Vector Generator
test yield
Bank System
Elevator 2
shifting
23
candies