Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
TmpFib
//Title of this code #include <iostream> #include <type_traits> #include <utility> using namespace std; template<std::size_t N> struct Fib { static const std::size_t value = Fib<N - 1>::value + Fib<N - 2>::value ; }; template<> struct Fib<1> { static const std::size_t value = 1; }; template<> struct Fib<0> { static const std::size_t value = 1; }; int main() { const int N = 50 ; cout << "Fib[" << N << "] = " << Fib<N>::value << endl; return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Summation Of Primes
decode
Test 4(2017)
C++ virtual dispose
virtual function
Hello
vector fr
VirtualRestoPoint
SEGMENTED SIEVE
Lockable static queue
Please log in to post a comment.