fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. const int N = 5;
  6.  
  7. template <int M>
  8. struct power_of_10
  9. {
  10. static const int value = 10 * power_of_10<M - 1>::value;
  11. };
  12.  
  13. template<>
  14. struct power_of_10<0>
  15. {
  16. static const int value = 1;
  17. };
  18.  
  19. const int M = power_of_10<N>::value;
  20.  
  21. int main()
  22. {
  23. cout << M << endl;
  24. return 0;
  25. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
100000