#include <iostream> template <int T> struct X { enum val {v = T * X<T-1>::v }; }; template <> struct X<0> { enum val {v = 1 }; }; int main() { std::cout<<X<5>::v; }
Login in to like
Login in to comment
or Read more about C++ Quizzes
Login in to like
Login in to comment