28int number_of_digits(
int num) {
52 int total_digits = number_of_digits(number);
57 sum +=
static_cast<int>(std::pow(rem, total_digits));
81 std::cout <<
"All tests have successfully passed!\n";
static void test()
Self-test implementations.
bool is_armstrong(const T &number)
Checks if the given number is armstrong or not.
T sum(const std::vector< std::valarray< T > > &A)