Run Code
|
API
|
Code Wall
|
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
temporaries and move constructor
Dec to Bin
NonparaH
C++ Array printing
break.cpp
MergeSort
funpointer
area of a circle using pointer
TupleCPP
Ploshtina na krug